khtruong opened a new pull request #7770: Autocomplete in the table browser in SQL lab is broken - Fix part 2 URL: https://github.com/apache/incubator-superset/pull/7770 ### CATEGORY Choose one - [x] Bug Fix - [ ] Enhancement (new features, refinement) - [ ] Refactor - [ ] Add tests - [ ] Build / Development Environment - [ ] Documentation ### SUMMARY This is the complete fix for autocomplete in the table browser in SQL lab. We use the createFilterOptions API from the react-select-fast-filter-options library for autocomplete. The API expects a list of option objects where its properties value and label are strings. The bug is that we were passing objects to the property value, which caused the algorithm to not work properly. Now we explicitly pass strings to the API. I had to update the unit tests to return promises because if you do not return a promise, Jest just calls the promise and continues onto the next test. This caused false positives. There were two tests that are broken and need to be fixed. I filed https://github.com/apache/incubator-superset/issues/7768 to track this so that this PR did not contain unrelated changes. ### TEST PLAN Manually and extended unit tests ### REVIEWERS @mistercrunch @betodealmeida @DiggidyDave @xtinec
---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
