bvaughn / react-virtualized

React components for efficiently rendering large lists and tabular data
http://bvaughn.github.io/react-virtualized/
MIT License
26.1k stars 3.05k forks source link

How to use search functionality similar to ctrl+f using react-virtualized #1835

Open samayvar opened 2 months ago

samayvar commented 2 months ago

I have a use case where I want to display a dynamic sized content with millions of rows using scrollbar which I am doing using react-virtualized list.

Is there a way to perform search on this list (using Ctrl+F)? Is there any existing library or an easier way to highlight all the places where the given search keyword exists and use enter to navigate to next instance of the search keyword? Or is there any way to integrate the react-virtualized with react-codemirror to use the codemirror search functionality?

thedevshubham commented 2 months ago

This does not seem to be an issue for @samayvar because Ctrl+F will work on the rendered DOM. However, when you are trying to find content in unmounted elements, it will not work, and that is expected. Read this once: https://medium.com/@Blochware/react-virtualization-efficiently-handling-large-lists-and-grids-a2d0f2dfd10#:~:text=React%20Virtualization%20is%20a%20technique,that%20React%20needs%20to%20manage.