question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update filer component with timeout

See original GitHub issue

GridFilter 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:closed
  • Created 8 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
bkrallcommented, Mar 10, 2017

Got it working! Looked at your example from the docs and adding plugins.LocalPlugin made the filtering work.

Thanks for your help, @ryanlanciaux. 🙏

0reactions
ryanlanciauxcommented, Mar 9, 2017

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 of this.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)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found