|
@@ -21,6 +21,7 @@ import {
|
|
|
useTreeRevalidation,
|
|
useTreeRevalidation,
|
|
|
} from '../hooks/_inner';
|
|
} from '../hooks/_inner';
|
|
|
import { usePageDnd, useSetEnableDragAndDrop } from '../hooks/use-page-dnd';
|
|
import { usePageDnd, useSetEnableDragAndDrop } from '../hooks/use-page-dnd';
|
|
|
|
|
+import { useSocketUpdateDescCount } from '../hooks/use-socket-update-desc-count';
|
|
|
import type { TreeItemProps } from '../interfaces';
|
|
import type { TreeItemProps } from '../interfaces';
|
|
|
import { useTriggerTreeRebuild } from '../states/_inner';
|
|
import { useTriggerTreeRebuild } from '../states/_inner';
|
|
|
|
|
|
|
@@ -94,6 +95,9 @@ export const SimplifiedItemsTree: FC<Props> = (props: Props) => {
|
|
|
const { canDrag, canDrop, onDrop, renderDragLine } = usePageDnd();
|
|
const { canDrag, canDrop, onDrop, renderDragLine } = usePageDnd();
|
|
|
const setEnableDragAndDrop = useSetEnableDragAndDrop();
|
|
const setEnableDragAndDrop = useSetEnableDragAndDrop();
|
|
|
|
|
|
|
|
|
|
+ // Subscribe to Socket.io UpdateDescCount events
|
|
|
|
|
+ useSocketUpdateDescCount();
|
|
|
|
|
+
|
|
|
// Set enable state for D&D
|
|
// Set enable state for D&D
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
setEnableDragAndDrop(enableDragAndDrop);
|
|
setEnableDragAndDrop(enableDragAndDrop);
|