Update filer component with timeout
See original GitHub issueGridFilter component updates it`s input after all data is filtered and it can be rather slow. Update with timeout fixes this issue.
handleChange: function (event) { var that = this; setTimeout(function(){ that.props.changeFilter(event.target.value); }, 0); },
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
How to update the state value using setTimeout in React Hooks?
The component displays this, set's it's own state value. After the timeout runs, it's updating it's own state, which causes a re-render, and...
Read more >setTimeout in React Components Using Hooks - Upmostly
A timer representing setTimeout inside of a React component. Use setTimeout in your React components to execute a function or block of code...
Read more >Security Update Timeout in Deep Security Agent
Open a command prompt on the Deep Security Manager (DSM). Execute the following to double the timeout interval: cd C:\Program Files\Trend Micro\Deep Security ......
Read more >Using setTimeout in React components (including hooks)
The setTimeout function accepts two arguments: the first is the callback function that we want to execute, and the second specifies the timeout...
Read more >Creating a IBM UrbanCode Deploy timeout configuration file
You can create a configuration file to store the default timeout values for the blueprint designer to use with IBM® UrbanCode™ Deploy agent,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Got it working! Looked at your example from the docs and adding
plugins.LocalPlugin
made the filtering work.Thanks for your help, @ryanlanciaux. 🙏
One last thing real fast before I can dive into this in more detail – if you switch to
this.props.setFilter(e.target.value)
instead ofthis.props.onChange(e.target.value)
that doesn’t work? I know you mentioned you did something like this and bound to current context but just double checking.Looks like we’re doing that for the component that’s rendered in the docs page – it’s totally possible we have a mismatch in the documentation. (here’s the actual component that is being used for the filter in the docs page)