@dooherceg/material-react-table 3.2.2-alpha.8 → 3.2.2-alpha.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.
- package/dist/index.d.ts +4 -15
- package/dist/index.esm.js +5 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4265,14 +4265,11 @@ const getFilterableColumns = (table) => {
|
|
|
4265
4265
|
// Users define them as regular MRT_ColumnDef (same API), but they are not rendered as a column in the table.
|
|
4266
4266
|
const virtualColumns = allLeafColumns.flatMap((column) => {
|
|
4267
4267
|
var _a, _b;
|
|
4268
|
-
return ((_b = (_a = column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.extraFieldFilters) !== null && _b !== void 0 ? _b : []).map((extraColumnDef) => {
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
columnDef: Object.assign(Object.assign({}, extraColumnDef), { columnDefType: 'data', enableColumnFilter: true }),
|
|
4274
|
-
});
|
|
4275
|
-
});
|
|
4268
|
+
return ((_b = (_a = column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.extraFieldFilters) !== null && _b !== void 0 ? _b : []).map((extraColumnDef) => ({
|
|
4269
|
+
// accessorKey is the primary identifier; id as fallback
|
|
4270
|
+
id: getColumnId(extraColumnDef),
|
|
4271
|
+
columnDef: Object.assign(Object.assign({}, extraColumnDef), { columnDefType: 'data', enableColumnFilter: true }),
|
|
4272
|
+
}));
|
|
4276
4273
|
});
|
|
4277
4274
|
return [...realFilterableColumns, ...virtualColumns];
|
|
4278
4275
|
};
|