@ixo/editor 6.32.1 → 6.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10521,6 +10521,9 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
10521
10521
|
setSelectedIds(/* @__PURE__ */ new Set());
|
|
10522
10522
|
}, []);
|
|
10523
10523
|
const fetchDataRef = useRef11(null);
|
|
10524
|
+
const handlersRef = useRef11(handlers);
|
|
10525
|
+
handlersRef.current = handlers;
|
|
10526
|
+
const fetchSeqRef = useRef11(0);
|
|
10524
10527
|
const selectionPanelId = `${LIST_SELECTION_FLOW_PANEL_ID}-${block.id}`;
|
|
10525
10528
|
const selectionPanelContent = useMemo42(
|
|
10526
10529
|
() => /* @__PURE__ */ React93.createElement(
|
|
@@ -10645,13 +10648,15 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
10645
10648
|
};
|
|
10646
10649
|
const daoRoleFilter = listType === "daos" && (listFilterConfig?.key === "isOwner" || listFilterConfig?.key === "isController") ? listFilterConfig.key : void 0;
|
|
10647
10650
|
const fetchData = useCallback32(async () => {
|
|
10648
|
-
|
|
10651
|
+
const currentHandlers = handlersRef.current;
|
|
10652
|
+
if (!currentHandlers || !listType) return;
|
|
10653
|
+
const seq = ++fetchSeqRef.current;
|
|
10649
10654
|
setLoading(true);
|
|
10650
10655
|
setError(null);
|
|
10651
10656
|
setUserRole(null);
|
|
10652
10657
|
try {
|
|
10653
10658
|
const result = await fetchListData({
|
|
10654
|
-
handlers,
|
|
10659
|
+
handlers: currentHandlers,
|
|
10655
10660
|
listType,
|
|
10656
10661
|
listConfig,
|
|
10657
10662
|
page,
|
|
@@ -10660,17 +10665,19 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
10660
10665
|
roomId: editor.getRoomId?.(),
|
|
10661
10666
|
matrixClient: editor.getMatrixClient?.()
|
|
10662
10667
|
});
|
|
10668
|
+
if (seq !== fetchSeqRef.current) return;
|
|
10663
10669
|
setData(result.data);
|
|
10664
10670
|
setTotalPages(result.totalPages);
|
|
10665
10671
|
setUserRole(result.userRole);
|
|
10666
10672
|
} catch (err) {
|
|
10673
|
+
if (seq !== fetchSeqRef.current) return;
|
|
10667
10674
|
setData({ items: [] });
|
|
10668
10675
|
setTotalPages(0);
|
|
10669
10676
|
setError(err instanceof Error ? err.message : "Failed to fetch data");
|
|
10670
10677
|
} finally {
|
|
10671
|
-
setLoading(false);
|
|
10678
|
+
if (seq === fetchSeqRef.current) setLoading(false);
|
|
10672
10679
|
}
|
|
10673
|
-
}, [
|
|
10680
|
+
}, [page, listType, listConfig, runtimeSearchValue, daoRoleFilter, editor]);
|
|
10674
10681
|
useEffect37(() => {
|
|
10675
10682
|
fetchDataRef.current = fetchData;
|
|
10676
10683
|
}, [fetchData]);
|
|
@@ -59684,4 +59691,4 @@ export {
|
|
|
59684
59691
|
ixoGraphQLClient,
|
|
59685
59692
|
getEntity
|
|
59686
59693
|
};
|
|
59687
|
-
//# sourceMappingURL=chunk-
|
|
59694
|
+
//# sourceMappingURL=chunk-VRCRDKN5.js.map
|