@moontra/moonui-pro 2.26.16 → 2.26.18

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
@@ -73509,8 +73509,23 @@ function DataTableQuickFilter({
73509
73509
  data
73510
73510
  }) {
73511
73511
  const [searchValue, setSearchValue] = useState("");
73512
- const column = table.getColumn(filter.column);
73512
+ let column = table.getColumn(filter.column);
73513
73513
  if (!column) {
73514
+ const allColumns = table.getAllColumns();
73515
+ column = allColumns.find((col) => {
73516
+ const colDef = col.columnDef;
73517
+ return colDef.accessorKey === filter.column || col.id === filter.column;
73518
+ });
73519
+ }
73520
+ if (typeof window !== "undefined" && true) {
73521
+ const allColumns = table.getAllColumns();
73522
+ console.log(`QuickFilter: Looking for column '${filter.column}'`, {
73523
+ availableColumns: allColumns.map((c2) => ({ id: c2.id, accessorKey: c2.columnDef.accessorKey })),
73524
+ columnFound: !!column
73525
+ });
73526
+ }
73527
+ if (!column) {
73528
+ console.warn(`QuickFilter: Column '${filter.column}' not found in table`);
73514
73529
  return null;
73515
73530
  }
73516
73531
  const columnDef = column.columnDef;
@@ -74001,9 +74016,17 @@ function DataTable({
74001
74016
  }
74002
74017
  };
74003
74018
  };
74019
+ const processedColumns = t__default.useMemo(() => {
74020
+ return columns.map((col) => {
74021
+ if (!col.id && col.accessorKey) {
74022
+ return { ...col, id: col.accessorKey };
74023
+ }
74024
+ return col;
74025
+ });
74026
+ }, [columns]);
74004
74027
  const table = useReactTable({
74005
74028
  data: stableData,
74006
- columns,
74029
+ columns: processedColumns,
74007
74030
  onSortingChange: onSortingChange !== void 0 ? onSortingChange : setSorting,
74008
74031
  onColumnFiltersChange: onColumnFiltersChange !== void 0 ? onColumnFiltersChange : setColumnFilters,
74009
74032
  onPaginationChange: onPaginationChange !== void 0 ? onPaginationChange : setPaginationState,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.26.16",
3
+ "version": "2.26.18",
4
4
  "description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",