mirror of
https://github.com/apache/superset.git
synced 2026-04-25 11:04:48 +00:00
fix(sql lab): MultiSelector component render twice (#20706)
* fix(sql lab): MultiSelector component render twice * filter null/undefined tables
This commit is contained in:
@@ -167,7 +167,7 @@ export default function SqlEditorLeftBar({
|
||||
actions.addTable(queryEditor, database, tableName, schemaName),
|
||||
);
|
||||
|
||||
currentTables.forEach(table => actions.removeTable(table));
|
||||
actions.removeTables(currentTables);
|
||||
};
|
||||
|
||||
const onToggleTable = (updatedTables: string[]) => {
|
||||
|
||||
@@ -57,7 +57,7 @@ export interface TableElementProps {
|
||||
table: Table;
|
||||
actions: {
|
||||
removeDataPreview: (table: Table) => void;
|
||||
removeTable: (table: Table) => void;
|
||||
removeTables: (tables: Table[]) => void;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ const TableElement = ({ table, actions, ...props }: TableElementProps) => {
|
||||
|
||||
const removeTable = () => {
|
||||
actions.removeDataPreview(table);
|
||||
actions.removeTable(table);
|
||||
actions.removeTables([table]);
|
||||
};
|
||||
|
||||
const toggleSortColumns = () => {
|
||||
|
||||
Reference in New Issue
Block a user