mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
bugfix: table chart query mode initial value (#10544)
This commit is contained in:
@@ -165,8 +165,9 @@ describe('Visualization > Table', () => {
|
||||
metrics: [],
|
||||
row_limit: 10,
|
||||
};
|
||||
|
||||
cy.visitChartByParams(JSON.stringify(formData));
|
||||
|
||||
cy.get('div[data-test="query_mode"] .btn.active').contains('Raw Records');
|
||||
cy.verifySliceSuccess({ waitAlias: '@getJson', chartSelector: 'table' });
|
||||
});
|
||||
|
||||
|
||||
@@ -110,7 +110,6 @@ function handleMissingChoice(control) {
|
||||
|
||||
export function applyMapStateToPropsToControl(controlState, controlPanelState) {
|
||||
const { mapStateToProps } = controlState;
|
||||
let { value } = controlState;
|
||||
let state = { ...controlState };
|
||||
if (mapStateToProps && controlPanelState) {
|
||||
state = {
|
||||
@@ -126,6 +125,7 @@ export function applyMapStateToPropsToControl(controlState, controlPanelState) {
|
||||
delete state.default;
|
||||
}
|
||||
}
|
||||
let { value } = state;
|
||||
// If no current value, set it as default
|
||||
if (state.default && value === undefined) {
|
||||
value = state.default;
|
||||
|
||||
Reference in New Issue
Block a user