fix(sql lab): MultiSelector component render twice (#20706)

* fix(sql lab): MultiSelector component render twice

* filter null/undefined tables
This commit is contained in:
Diego Medina
2022-07-19 08:33:15 -03:00
committed by GitHub
parent e60083b45b
commit 115ab700df
6 changed files with 43 additions and 17 deletions

View File

@@ -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 = () => {