feat: upgrade react-select and make multi-select sortable (#9628)

* feat: upgrade react-select v1.3.0 to v3.1.0

Upgrade `react-select`, replace `react-virtualized-select` with a custom
solution implemented with `react-window`.

Future plans include deprecate `react-virtualized` used in other places, too.

Migrate all react-select related components to `src/Components/Select`.

* Fix new list view

* Fix tests

* Address PR comments

* Fix a flacky Cypress test

* Adjust styles for Select in CRUD ListView

* Fix loadOptions for owners select in chart PropertiesModal

TODO: add typing support for AsyncSelect props.

* Address PR comments; allow isMulti in SelectControl, too

* Clean up NaN in table filter values

* Fix flacky test
This commit is contained in:
Jesse Yang
2020-05-19 16:59:49 -07:00
committed by GitHub
parent 68832d2fa5
commit 81ab8dd8b4
97 changed files with 2027 additions and 1234 deletions

View File

@@ -17,11 +17,11 @@
* under the License.
*/
import React from 'react';
import Select from 'react-select';
import { Button } from 'react-bootstrap';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import Select from 'src/components/Select';
import QuerySearch from 'src/SqlLab/components/QuerySearch';
describe('QuerySearch', () => {
@@ -39,7 +39,7 @@ describe('QuerySearch', () => {
});
it('should have three Select', () => {
expect(wrapper.find(Select)).toHaveLength(3);
expect(wrapper.findWhere(x => x.type() === Select)).toHaveLength(3);
});
it('updates fromTime on user selects from time', () => {