Topic: Search problem - component column
Piotrek Nero asked 5 years ago
Expected behavior "searchValue" props in component as column can be number in MDBDatable.
Actual behavior MDBDatable crash after typing in search field. "TypeError: stringValue.toLowerCase is not a function"
Resources (screenshots, code snippets etc.) Problematic code fragment (filterRows function):
if (sortRows && typeof row[key] !== 'string') {
stringValue = row[key].props.searchValue;
} else {
if (row[key]) {
stringValue = row[key].toString();
}
}
if (stringValue.toLowerCase().includes(search.toLowerCase())) return true;
Is this a bug or intentional? There is no information about searchValue in the documentation or changelog. I found only one thread about it.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB React
- MDB Version: 4.19.2
- Device: Desktop
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: Yes
Piotr Glejzer staff commented 5 years ago
Hello,
I think is intentional. But I also think it should more explain and change eventually. I added this to our list to do. ( I don't know why it is not still resolved). Sorry about that. We will check it as soon as possible. Probably in the next release. Have a nice day.
Piotr Glejzer staff commented 5 years ago
is this problem still exist?