TarikHuber / material-ui-filter

Material UI Drawer for filtering local arrays

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Search filter should exclude column names

shoebaamir7 opened this issue · comments

In function getFilteredList() in file selectors.js,
This line
if (searchValue != null && searchValue !== '' && show) {
show =
JSON.stringify(row)
.toUpperCase()
.indexOf(String(searchValue).toUpperCase()) !== -1
}

Here row is an object which contains column name as key and it's value as value. Now when we stringify this object, it will include column names as well in the created string. Ideally the the search filter should be applicable to row values and not column names.