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
There's a weird issue with select filter when I select one value and getting wrong filter results in table.
I think that problem is related to "key" from qualityType (it's showing data in table for 1, and 17 which contains 1 inside). For unknown "key" is 2 and it's not shown as result of filtering. const qualityType = { 1: 'bad', 2: 'unknown', 17: 'good' };
Check this gist - Select filter.js
Check next images: 1. Bad selected with key 1 - this is wrong 2. Unknown selected with key 2 3. Good selected with key 17
Code is just a small modification from example - select-filter-with-default-value.js
Only changes made are qualityType and product.push method.
Am I doing something wrong?
Feel free to contact me if you need any other information.
Regards,
Najdan
The text was updated successfully, but these errors were encountered:
@Najdan, actually it's not a bug, it's just a bad examples...because the value of field qualityType is number(ex: 1,2,3), but the select filter in react-bootstrap-table is use string.indexOf() to filter data, so that's why you got this result.
BTW, there's a enhancement need to do, react-bootstrap-table support filterFormatted props on <TableHeaderColumn> but it only format the data before filtering but I forgot to format the formatExtraData.
Anyway, I'll do a patch for this issues and make examples more better. Thanks you
There's a weird issue with select filter when I select one value and getting wrong filter results in table.
I think that problem is related to "key" from qualityType (it's showing data in table for 1, and 17 which contains 1 inside). For unknown "key" is 2 and it's not shown as result of filtering.
const qualityType = { 1: 'bad', 2: 'unknown', 17: 'good' };
Check this gist - Select filter.js
Check next images:
1. Bad selected with key 1 - this is wrong
2. Unknown selected with key 2
3. Good selected with key 17
Code is just a small modification from example - select-filter-with-default-value.js
Only changes made are qualityType and product.push method.
Am I doing something wrong?
Feel free to contact me if you need any other information.
Regards,
Najdan
The text was updated successfully, but these errors were encountered: