kgabryje opened a new pull request #13211: URL: https://github.com/apache/superset/pull/13211
### SUMMARY Due to recent changes regarding resetting control values when datasource changes, debounce in TextControl component did not work properly. This was caused by comparing `props.value` with `state.value` and setting `state.value` to `props.value` if they were not equal. Because of using 0.5s debounce, props and state values were always unequal when user typed a new value. This PR fixes the issue by adding a comparison of props and state datasource and updating value only when datasources are not equal. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Before: see https://github.com/apache/superset/issues/13191 After: Uploading Nagranie z ekranu 2021-02-18 o 15.49.45.mov… ### TEST PLAN <!--- What steps should be taken to verify the changes --> ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [x] Has associated issue: fixes https://github.com/apache/superset/issues/13191 - [ ] Changes UI - [ ] Requires DB Migration. - [ ] Confirm DB Migration upgrade and downgrade tested. - [ ] Introduces new feature or API - [ ] Removes existing feature or API CC: @villebro @junlincc @nikolagigic @mayurnewase ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
