mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
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:
@@ -32,11 +32,11 @@ describe('AdhocMetric', () => {
|
||||
expressionType: EXPRESSION_TYPES.SIMPLE,
|
||||
column: valueColumn,
|
||||
aggregate: AGGREGATES.SUM,
|
||||
fromFormData: false,
|
||||
label: 'SUM(value)',
|
||||
hasCustomLabel: false,
|
||||
optionName: adhocMetric.optionName,
|
||||
sqlExpression: null,
|
||||
isNew: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -44,6 +44,7 @@ describe('AdhocMetric', () => {
|
||||
const adhocMetric1 = new AdhocMetric({
|
||||
column: valueColumn,
|
||||
aggregate: AGGREGATES.SUM,
|
||||
isNew: true,
|
||||
});
|
||||
const adhocMetric2 = adhocMetric1.duplicateWith({
|
||||
aggregate: AGGREGATES.AVG,
|
||||
@@ -54,6 +55,10 @@ describe('AdhocMetric', () => {
|
||||
|
||||
expect(adhocMetric1.aggregate).toBe(AGGREGATES.SUM);
|
||||
expect(adhocMetric2.aggregate).toBe(AGGREGATES.AVG);
|
||||
|
||||
// duplicated clone should not be new
|
||||
expect(adhocMetric1.isNew).toBe(true);
|
||||
expect(adhocMetric2.isNew).toStrictEqual(false);
|
||||
});
|
||||
|
||||
it('can verify equality', () => {
|
||||
|
||||
Reference in New Issue
Block a user