mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix(explore): Prevent shared controls from checking feature flags outside React render (#21315)
This commit is contained in:
@@ -49,7 +49,7 @@ const allColumns: typeof sharedControls.groupby = {
|
||||
options: datasource?.columns || [],
|
||||
queryMode: getQueryMode(controls),
|
||||
externalValidationErrors:
|
||||
isRawMode({ controls }) && ensureIsArray(controlState.value).length === 0
|
||||
isRawMode({ controls }) && ensureIsArray(controlState?.value).length === 0
|
||||
? [t('must have a value')]
|
||||
: [],
|
||||
}),
|
||||
@@ -74,7 +74,7 @@ const dndAllColumns: typeof sharedControls.groupby = {
|
||||
}
|
||||
newState.queryMode = getQueryMode(controls);
|
||||
newState.externalValidationErrors =
|
||||
isRawMode({ controls }) && ensureIsArray(controlState.value).length === 0
|
||||
isRawMode({ controls }) && ensureIsArray(controlState?.value).length === 0
|
||||
? [t('must have a value')]
|
||||
: [];
|
||||
return newState;
|
||||
|
||||
@@ -46,7 +46,7 @@ const percentMetrics: typeof sharedControls.metrics = {
|
||||
externalValidationErrors: validateAggControlValues(controls, [
|
||||
controls.groupby?.value,
|
||||
controls.metrics?.value,
|
||||
controlState.value,
|
||||
controlState?.value,
|
||||
]),
|
||||
}),
|
||||
rerender: ['groupby', 'metrics'],
|
||||
|
||||
Reference in New Issue
Block a user