fix: Stop enqueuing document analysis job when only title changes
This commit is contained in:
@@ -70,6 +70,26 @@ const AbstractDocumentsView = <CProps extends { clearSelection: () => void; chil
|
||||
ensureFocusedEntryVisible();
|
||||
}, [ensureFocusedEntryVisible]);
|
||||
|
||||
const { detailPanelOpen } = usePanelManager();
|
||||
|
||||
useEffect(() => {
|
||||
const container = scrollRef?.current;
|
||||
if (!container) return;
|
||||
|
||||
const handleTransitionEnd = () => {
|
||||
ensureFocusedEntryVisible();
|
||||
};
|
||||
|
||||
container.addEventListener('transitionend', handleTransitionEnd);
|
||||
|
||||
// Immediate check in case there is no transition or it finished already
|
||||
ensureFocusedEntryVisible();
|
||||
|
||||
return () => {
|
||||
container.removeEventListener('transitionend', handleTransitionEnd);
|
||||
};
|
||||
}, [scrollRef, ensureFocusedEntryVisible, detailPanelOpen]);
|
||||
|
||||
return (
|
||||
<ContainerComponent
|
||||
clearSelection={clearSelection}
|
||||
|
||||
Reference in New Issue
Block a user