@redsift/table 11.0.0-alpha.2 → 11.0.0-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
|
@@ -18081,7 +18081,7 @@ const listOperators = ['containsAnyOf', 'endsWithAnyOf', 'isAnyOf', 'isNotAnyOf'
|
|
|
18081
18081
|
const isValueValid = (value, field, columns, operator) => {
|
|
18082
18082
|
var _column$type;
|
|
18083
18083
|
// every field accepts undefined as value for default
|
|
18084
|
-
if (value === undefined) {
|
|
18084
|
+
if (value === undefined || value === '') {
|
|
18085
18085
|
return true;
|
|
18086
18086
|
}
|
|
18087
18087
|
|
|
@@ -18139,7 +18139,7 @@ const getFilterModelFromString = (searchString, columns) => {
|
|
|
18139
18139
|
let logicOperator = GridLogicOperator.And;
|
|
18140
18140
|
const searchParams = new URLSearchParams();
|
|
18141
18141
|
for (const [key, value] of new URLSearchParams(searchString)) {
|
|
18142
|
-
if (key.startsWith('_') && !['_logicOperator', '_sortColumn', '_pinnedColumnsLeft', '_pinnedColumnsRight', '_columnVisibility'].includes(key)) {
|
|
18142
|
+
if (key.startsWith('_') && !['_logicOperator', '_sortColumn', '_pinnedColumnsLeft', '_pinnedColumnsRight', '_columnVisibility', '_pagination'].includes(key)) {
|
|
18143
18143
|
searchParams.set(key, value);
|
|
18144
18144
|
}
|
|
18145
18145
|
if (key === '_logicOperator') {
|
|
@@ -26212,10 +26212,8 @@ const useStatefulTable = props => {
|
|
|
26212
26212
|
onFilterModelChange: (model, details) => {
|
|
26213
26213
|
const filterModel = _objectSpread2(_objectSpread2({}, model), {}, {
|
|
26214
26214
|
items: model.items.map(item => {
|
|
26215
|
-
|
|
26216
|
-
|
|
26217
|
-
item.type = column.type || 'string';
|
|
26218
|
-
}
|
|
26215
|
+
const column = apiRef.current.getColumn(item.field);
|
|
26216
|
+
item.type = column.type || 'string';
|
|
26219
26217
|
return item;
|
|
26220
26218
|
})
|
|
26221
26219
|
});
|