@mamrp/components 1.4.4 → 1.4.5

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.
package/dist/index.mjs CHANGED
@@ -4834,6 +4834,8 @@ var DataTable = ({
4834
4834
  enableGlobalFilter = false,
4835
4835
  enableColumnFilterModes = false,
4836
4836
  enableRowSelection = false,
4837
+ showColumnFilters,
4838
+ onShowColumnFiltersChange,
4837
4839
  renderTopToolbarCustomActions,
4838
4840
  renderBottomToolbarCustomActions,
4839
4841
  tableOptions = {},
@@ -4842,8 +4844,8 @@ var DataTable = ({
4842
4844
  const memoizedColumns = useMemo(() => columns, [columns]);
4843
4845
  const memoizedData = useMemo(() => data, [data]);
4844
4846
  const defaultRenderTopToolbarCustomActions = ({ table: table2 }) => {
4845
- const showFilters = table2.getState().showColumnFilters;
4846
- if (!showFilters || !showClearFiltersButton || !onClearFilters) return null;
4847
+ const currentShowFilters = showColumnFilters !== void 0 ? showColumnFilters : table2.getState().showColumnFilters;
4848
+ if (!currentShowFilters || !showClearFiltersButton || !onClearFilters) return null;
4847
4849
  return /* @__PURE__ */ React.createElement(Box23, { sx: { width: "100%" } }, /* @__PURE__ */ React.createElement(
4848
4850
  Box23,
4849
4851
  {
@@ -4889,12 +4891,14 @@ var DataTable = ({
4889
4891
  // columnFilters, // غیرفعال شده - فیلترها از طریق useTableState مدیریت می‌شوند
4890
4892
  sorting,
4891
4893
  columnVisibility,
4894
+ ...showColumnFilters !== void 0 && { showColumnFilters },
4892
4895
  ...columnOrder && Array.isArray(columnOrder) && columnOrder.length > 0 && { columnOrder },
4893
4896
  isLoading,
4894
4897
  showProgressBars: isRefetching
4895
4898
  },
4896
4899
  // === Event Handlers ===
4897
4900
  onColumnVisibilityChange,
4901
+ ...onShowColumnFiltersChange && { onShowColumnFiltersChange },
4898
4902
  ...onColumnOrderChange && { onColumnOrderChange },
4899
4903
  // === استایل‌دهی ===
4900
4904
  muiTablePaperProps: { sx: { direction: "ltr" } },