@redsift/table 11.0.0-muiv5-alpha.2 → 11.0.0-muiv5-alpha.3
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/index.js +4 -6
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -18084,7 +18084,7 @@ const listOperators = ['containsAnyOf', 'endsWithAnyOf', 'isAnyOf', 'isNotAnyOf'
|
|
|
18084
18084
|
const isValueValid = (value, columnField, columns, operatorValue) => {
|
|
18085
18085
|
var _column$type;
|
|
18086
18086
|
// every field accepts undefined as value for default
|
|
18087
|
-
if (value === undefined) {
|
|
18087
|
+
if (value === undefined || value === '') {
|
|
18088
18088
|
return true;
|
|
18089
18089
|
}
|
|
18090
18090
|
|
|
@@ -18142,7 +18142,7 @@ const getFilterModelFromString = (searchString, columns) => {
|
|
|
18142
18142
|
let linkOperator = GridLinkOperator.And;
|
|
18143
18143
|
const searchParams = new URLSearchParams();
|
|
18144
18144
|
for (const [key, value] of new URLSearchParams(searchString)) {
|
|
18145
|
-
if (key.startsWith('_') && !['_logicOperator', '_sortColumn', '_pinnedColumnsLeft', '_pinnedColumnsRight', '_columnVisibility'].includes(key)) {
|
|
18145
|
+
if (key.startsWith('_') && !['_logicOperator', '_sortColumn', '_pinnedColumnsLeft', '_pinnedColumnsRight', '_columnVisibility', '_pagination'].includes(key)) {
|
|
18146
18146
|
searchParams.set(key, value);
|
|
18147
18147
|
}
|
|
18148
18148
|
if (key === '_logicOperator') {
|
|
@@ -26254,10 +26254,8 @@ const useStatefulTable = props => {
|
|
|
26254
26254
|
onFilterModelChange: (model, details) => {
|
|
26255
26255
|
const filterModel = _objectSpread2(_objectSpread2({}, model), {}, {
|
|
26256
26256
|
items: model.items.map(item => {
|
|
26257
|
-
|
|
26258
|
-
|
|
26259
|
-
item.type = column.type || 'string';
|
|
26260
|
-
}
|
|
26257
|
+
const column = apiRef.current.getColumn(item.columnField);
|
|
26258
|
+
item.type = column.type || 'string';
|
|
26261
26259
|
return item;
|
|
26262
26260
|
})
|
|
26263
26261
|
});
|