Skip to content

Commit

Permalink
feat: apply standardized form data to deckgl
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie committed Jul 1, 2022
1 parent b99482d commit 584a43e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
import { ControlPanelConfig, sections } from '@superset-ui/chart-controls';
import {
ControlPanelConfig,
getStandardizedControls,
sections,
} from '@superset-ui/chart-controls';
import { t, validateNonEmpty } from '@superset-ui/core';
import {
filterNulls,
Expand Down Expand Up @@ -71,6 +75,10 @@ const config: ControlPanelConfig = {
validators: [validateNonEmpty],
},
},
formDataOverrides: formData => ({
...formData,
size: getStandardizedControls().shiftMetric(),
}),
};

export default config;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
import { ControlPanelConfig, sections } from '@superset-ui/chart-controls';
import {
ControlPanelConfig,
getStandardizedControls,
sections,
} from '@superset-ui/chart-controls';
import { t } from '@superset-ui/core';
import { formatSelectOptions } from '../../utilities/utils';
import {
Expand Down Expand Up @@ -96,6 +100,10 @@ const config: ControlPanelConfig = {
],
},
],
formDataOverrides: formData => ({
...formData,
size: getStandardizedControls().shiftMetric(),
}),
};

export default config;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
import { ControlPanelConfig, sections } from '@superset-ui/chart-controls';
import {
ControlPanelConfig,
getStandardizedControls,
sections,
} from '@superset-ui/chart-controls';
import { FeatureFlag, isFeatureEnabled, t } from '@superset-ui/core';
import timeGrainSqlaAnimationOverrides from '../../utilities/controls';
import { formatSelectOptions } from '../../utilities/utils';
Expand Down Expand Up @@ -194,6 +198,10 @@ const config: ControlPanelConfig = {
},
time_grain_sqla: timeGrainSqlaAnimationOverrides,
},
formDataOverrides: formData => ({
...formData,
metric: getStandardizedControls().shiftMetric(),
}),
};

export default config;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
import { ControlPanelConfig, sections } from '@superset-ui/chart-controls';
import {
ControlPanelConfig,
getStandardizedControls,
sections,
} from '@superset-ui/chart-controls';
import { t, validateNonEmpty } from '@superset-ui/core';
import timeGrainSqlaAnimationOverrides from '../../utilities/controls';
import {
Expand Down Expand Up @@ -76,6 +80,10 @@ const config: ControlPanelConfig = {
},
time_grain_sqla: timeGrainSqlaAnimationOverrides,
},
formDataOverrides: formData => ({
...formData,
size: getStandardizedControls().shiftMetric(),
}),
};

export default config;

0 comments on commit 584a43e

Please sign in to comment.