I’ve created a React functional component which uses a JqxGrid and a field to do a remote filter, and it’s calling the service twice for some unknown reason. The jsonplaceholder API I’m using supports a ?userId parameter so I can send a different number to filter results remotely.
If I type a different number, two requests are made to the service (one with the previous userId value, then another with the new userId value). It should only be calling it once with the new value, but I have no idea why it’s doing it twice.
I’ve created a demo in Code Sandbox to demonstrate the problem. If you open developer tools and watch for XHR requests, you’ll see that the remote service is called twice, even though I’m setting the query variable only once and the dataAdapter is only set once, too.
https://codesandbox.io/s/jqxgrid-react-function-component-0s0id