mirror of
https://github.com/apache/superset.git
synced 2024-09-06 13:57:40 -04:00
fix(explore): Fix datasource switch for table chart (#21544)
This commit is contained in:
parent
b36bd3f083
commit
954fc89871
@ -36,11 +36,12 @@ const isControlValueCompatibleWithDatasource = (
|
||||
) => {
|
||||
if (controlState.options && typeof value === 'string') {
|
||||
if (
|
||||
(Array.isArray(controlState.options) &&
|
||||
controlState.options.some(
|
||||
(option: [string | number, string]) => option[0] === value,
|
||||
)) ||
|
||||
value in controlState.options
|
||||
controlState.options.some(
|
||||
(option: [string | number, string] | { column_name: string }) =>
|
||||
Array.isArray(option)
|
||||
? option[0] === value
|
||||
: option.column_name === value,
|
||||
)
|
||||
) {
|
||||
return datasource.columns.some(column => column.column_name === value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user