material-table: Search doesnt include columns with custom `render`
Describe the bug
Using column with custom render
function exclude it from search.
To Reproduce Steps to reproduce the behavior:
- Use columns with
render
for id - Search by partial id
Expected behavior Search results show columns with matching id
Actual behaviour Search cant use columns with render
Additional context E.g. columns
const columns = [
{title: 'Some Id', render: renderSomeId, field: 'some_id'},
...
];
...
const renderSomeId = (row) => {
<Link to={someUrl + row.some_id}>
{row.some_id}
</Link>
}
As a result, we have links with id text shown. If we have ids like abc123, abc234, test000 we would expect that search for abc
would show first 2 rows; however, “no results” shown.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (12 by maintainers)
Commits related to this issue
- This closes #67, customFilterAndSearch problem resolved — committed to mbrn/material-table by mbrn 5 years ago
Hi @Prasad-YS ,
I think that would be enough for you
@sarates ,
Add customFilterAndSearch field to your column definition.
@mbrn thanks a lot!