@azrico/reactgrid 1.3.20 → 1.3.21
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.
|
@@ -291,6 +291,8 @@ function DataGridSearchWrapper(props) {
|
|
|
291
291
|
const visibleColumns = props.gridRef.current.visibleColumns;
|
|
292
292
|
const columns_to_search = (0, _object.array_intersection)(props.advancedFilterFields || [], visibleColumns.map(r => r.id));
|
|
293
293
|
const lowerSearchText = currentSearch.current.toLowerCase().trim();
|
|
294
|
+
console.log('cols:', columns_to_search);
|
|
295
|
+
console.log('s:', lowerSearchText);
|
|
294
296
|
if (!lowerSearchText) newData = currentDS.current;else newData = currentDS.current.filter(p => {
|
|
295
297
|
for (let index = 0; index < columns_to_search.length; index++) {
|
|
296
298
|
const col = columns_to_search[index];
|
|
@@ -300,6 +302,7 @@ function DataGridSearchWrapper(props) {
|
|
|
300
302
|
return true;
|
|
301
303
|
});
|
|
302
304
|
} else newData = currentDS.current;
|
|
305
|
+
console.log('newData:', newData.length);
|
|
303
306
|
set_filteredData(newData);
|
|
304
307
|
}, 1000), []);
|
|
305
308
|
_react.default.useEffect(() => {
|
package/package.json
CHANGED
package/src/views/DataGrid.tsx
CHANGED
|
@@ -455,6 +455,8 @@ function DataGridSearchWrapper(props: DataGridWrapperProps) {
|
|
|
455
455
|
visibleColumns.map((r) => r.id)
|
|
456
456
|
);
|
|
457
457
|
const lowerSearchText = currentSearch.current.toLowerCase().trim();
|
|
458
|
+
console.log('cols:', columns_to_search);
|
|
459
|
+
console.log('s:', lowerSearchText);
|
|
458
460
|
if (!lowerSearchText) newData = currentDS.current;
|
|
459
461
|
else
|
|
460
462
|
newData = currentDS.current.filter((p) => {
|
|
@@ -467,6 +469,7 @@ function DataGridSearchWrapper(props: DataGridWrapperProps) {
|
|
|
467
469
|
return true;
|
|
468
470
|
});
|
|
469
471
|
} else newData = currentDS.current;
|
|
472
|
+
console.log('newData:', newData.length);
|
|
470
473
|
|
|
471
474
|
set_filteredData(newData);
|
|
472
475
|
}, 1000),
|