Search for data in table
Heyho, first of all many thanks for this great library! I use many of the built-in features for really large tables and this works very well. Now I would like to be able to find numbers in the table and color them(or the cell) and in the best case still jump to the appropriate place. This works with the built-in search of the browser only if the numbers are visible in the window.
By searching in the data of the table I can locate row and column fast, but I am neither able to color the corresponding cell/string, nor to set the focus on the cell. Do you have any idea for doing this?
I found a solution by rendering the table new for each search, but I think there's an easier solution for which I'm just too stupid xD.
Many thanks and stay healthy ;-)
because of virtualization, the native browser search won't help as most of the items are not rendered, so you have to locate the matched item and use the scrollToXXX methods to scroll to the desired position
Thanks! - The "this.table.scrollToRow(100, 'start')" method is nice and helps already a lot!
For scrolling horizontally i can use the table.scrollToLeft(...) function. (I did not find a method like "scrollToCol", but I can implement it based on scrollToLeft(), so it is no problem.)
My only open question now is whether I can color single cells or their texts. I would like to do this to highlight the cells or texts that contain my search term. For me it looks similar to the inline-edit problem, and therefore it might require a complicated solution, but maybe you have a better idea.
Thanks a lot ;-)
I think a custom TableCell and read the search text from context would help, TableCell applies to all cells while cellRenderer only applies for a column, but be ware that cellRenderer will replace the role of TableCell if it's presented