@ai-matrx/design-system 0.50.6 → 0.50.9

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.
@@ -53597,7 +53597,9 @@ function MatrxDataTableCore(coreProps) {
53597
53597
  const facetInputsRef = useRef28({ data, facets, facetReadCell, coreFacetTotal, coreFacetLoaded });
53598
53598
  facetInputsRef.current = { data, facets, facetReadCell, coreFacetTotal, coreFacetLoaded };
53599
53599
  const facetRequestRef = useRef28(/* @__PURE__ */ new Map());
53600
+ const requestedFacetColumns = useRef28(/* @__PURE__ */ new Set());
53600
53601
  const requestFacets = useCallback15((colId) => {
53602
+ requestedFacetColumns.current.add(colId);
53601
53603
  const { data: rows, facets: config, facetReadCell: readCell, coreFacetTotal: total, coreFacetLoaded: loaded } = facetInputsRef.current;
53602
53604
  if (!config || config.enabled === false) {
53603
53605
  const complete2 = localFacetsAreComplete(loaded ?? rows.length, total ?? rows.length);
@@ -53681,8 +53683,13 @@ function MatrxDataTableCore(coreProps) {
53681
53683
  }, []);
53682
53684
  useEffect26(() => {
53683
53685
  setFacetState({});
53684
- facetRequestRef.current = /* @__PURE__ */ new Map();
53685
- }, [facetsEnabled, data, searchValue, coreFacetTotal, coreFacetLoaded]);
53686
+ for (const [colId, ticket] of facetRequestRef.current) {
53687
+ facetRequestRef.current.set(colId, ticket + 1);
53688
+ }
53689
+ if (facetsEnabled || coreSuggestionsEnabled) {
53690
+ for (const colId of requestedFacetColumns.current) requestFacets(colId);
53691
+ }
53692
+ }, [facetsEnabled, coreSuggestionsEnabled, data, searchValue, coreFacetTotal, coreFacetLoaded, requestFacets]);
53686
53693
  const totalIsKnown = !isLoading && !readView.failure;
53687
53694
  useEffect26(() => {
53688
53695
  if (!controlledQuery || !totalIsKnown || controlledQuery.state.page === safePage) return;
@@ -54735,8 +54742,11 @@ function MatrxDataTableCore(coreProps) {
54735
54742
  columnDragPreview,
54736
54743
  reorderableColumns,
54737
54744
  facetsEnabled,
54738
- facetsEnabled ? facetState : null,
54739
- facetsEnabled ? requestFacets : null,
54745
+ coreSuggestionsEnabled,
54746
+ // Automatic known-value choices update the same header as configured facets.
54747
+ // Otherwise a settled, memoised header keeps the menu's initial empty list.
54748
+ facetsEnabled || coreSuggestionsEnabled ? facetState : null,
54749
+ facetsEnabled || coreSuggestionsEnabled ? requestFacets : null,
54740
54750
  filterUi,
54741
54751
  host,
54742
54752
  captureResizeGestureSnapshot,