classtranscribe / FrontEnd

The React + Redux Frontend for ClassTranscribe
https://classtranscribe.illinois.edu
Other
25 stars 27 forks source link

Admin Instructor List: Make Search Live instead of requiring a button click or enter #807

Open harsh183 opened 1 month ago

harsh183 commented 1 month ago

With https://github.com/classtranscribe/FrontEnd/pull/806 we are now using a React State to track the text box. Based on this, we can make the search happen 'live' with every state change. That way we won't need to even hit enter or click the button.

React is quite smart with vdom refreshes around this kind of search, so the performance should be quite good.

harsh183 commented 1 month ago

Copying over comment

FYI how to properly debounce a search in react- https://www.alexhughes.dev/blog/settimeout-with-hooks/ https://dev.to/imforja/5-steps-to-perform-a-search-when-user-stops-typing-using-react-hooks-in-a-controlled-component-5edd