You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Apply Search
if (this.state && this.state.searchText) {
renderData = renderData.filter(row => {
let result = false;
this.state.columns
.filter(columnDef => { return columnDef.searchable === undefined ? !columnDef.hidden : columnDef.searchable })
.forEach(columnDef => {
if (columnDef.customFilterAndSearch) {
result = !!columnDef.customFilterAndSearch(this.state.searchText, row, columnDef);
}
else if (columnDef.field) {
const value = this.getFieldValue(row, columnDef);
if (value && value.toString().toUpperCase().includes(this.state.searchText.toUpperCase())) {
result = true;
}
}
});
return result;
});
}
The addition of the customFilterAndSearch functionality has partially broken the search functionality depending on where customFilterAndSearch is used.
If for instance customFilterAndSearch was the last column in the column definition list (worst case) then only this field would be included in the search logic as it would overwrite any results from previous findings.
I'll be submitting a patch shortly.
The text was updated successfully, but these errors were encountered:
The addition of the customFilterAndSearch functionality has partially broken the search functionality depending on where customFilterAndSearch is used.
If for instance customFilterAndSearch was the last column in the column definition list (worst case) then only this field would be included in the search logic as it would overwrite any results from previous findings.
I'll be submitting a patch shortly.
The text was updated successfully, but these errors were encountered: