fix: ensure selection is cleared on entry change
- Added a useEffect hook to clear selection whenever the entryId changes, improving the component's responsiveness to entry updates. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
+4
@@ -91,6 +91,10 @@ export const ArticleLayout: React.FC<EntryLayoutProps> = ({
|
||||
handleSelectionClear()
|
||||
}, [showTranscript, handleSelectionClear])
|
||||
|
||||
useEffect(() => {
|
||||
handleSelectionClear()
|
||||
}, [entryId, handleSelectionClear])
|
||||
|
||||
if (!entry) return null
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user