From fc0ccbfcf5bf5beaa7b9e00ef3d358b9b1e7c939 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 18 Jan 2026 18:19:35 +0200 Subject: [PATCH] chore(sql_console): address requested changes --- .../widgets/collections/table/tabulator.tsx | 5 +++- .../src/widgets/type_widgets/SqlConsole.tsx | 24 ++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/apps/client/src/widgets/collections/table/tabulator.tsx b/apps/client/src/widgets/collections/table/tabulator.tsx index d908104ce..62d7283b9 100644 --- a/apps/client/src/widgets/collections/table/tabulator.tsx +++ b/apps/client/src/widgets/collections/table/tabulator.tsx @@ -71,7 +71,10 @@ export default function Tabulator({ className, columns, data, modules, tabula // Change in data. useEffect(() => { tabulatorRef.current?.setData(data); }, [ data ]); - useEffect(() => { columns && tabulatorRef.current?.setColumns(columns); }, [ data ]); + useEffect(() => { + if (!columns) return; + tabulatorRef.current?.setColumns(columns); + }, [ columns ]); return (
diff --git a/apps/client/src/widgets/type_widgets/SqlConsole.tsx b/apps/client/src/widgets/type_widgets/SqlConsole.tsx index 8823f59ab..6b8f79a5f 100644 --- a/apps/client/src/widgets/type_widgets/SqlConsole.tsx +++ b/apps/client/src/widgets/type_widgets/SqlConsole.tsx @@ -160,20 +160,16 @@ export function SqlTableSchemas({ note }: TypeWidgetProps) { {schemas.map(({ name, columns }) => ( - - - - {columns.map(column => ( - - - - - ))} -
{column.name}{column.type}
-
- {" "} -
+ + + {columns.map(column => ( + + + + + ))} +
{column.name}{column.type}
+
))}