Closed lovato closed 5 years ago
@lovato searchFormatted
is only good for the simple value, I don't suggest to use it if your return is a complex react element. In your case, you can use column.filterValue
If column.filterValue
is still not fit to your requirement, please tag me, I will do some enhancement. thanks!
If you are like me and really needed a search bar and filterValue wasn't the solution, and hidden column with all the row's data do the trick.
I took a look at this issue: https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/532
But the solution was not clear to me. And I am facing the same problem.
I did:
Column:
titleFormatter which WORKS:
titleFormatter which DOESNT WORK:
It simply finds nothing after typing something at search bar. My return object is far complex than this sole DIV. And oddly, it was finding stuff eventually, at a constant pattern. Some strings were found, some not, and some besides finding were not present on the final HTML. That's why I removed my object and replaced with this plain string (and div+string).
Any ideas?
My full titleFormatter, for reference, is (cell contains product name):
And a section of my table declaration: