diff --git a/web/components/chat/db-editor.tsx b/web/components/chat/db-editor.tsx
index 0c8093cf8..8c4994bdb 100644
--- a/web/components/chat/db-editor.tsx
+++ b/web/components/chat/db-editor.tsx
@@ -60,18 +60,20 @@ function DbEditorContent({ editorValue, chartData, tableData, handleChange }: IP
return (
-
+
{tableData?.values?.length > 0 ? (
>((item) => ({
- key: item,
- dataIndex: item,
- label: item,
- }))}
+ columns={(tableData?.columns as any[]).map>((item) => {
+ return {
+ dataIndex: item,
+ title: item,
+ key: item,
+ };
+ })}
dataSource={tableData?.values}
/>
) : (
@@ -95,7 +97,7 @@ function DbEditor() {
const [newEditorValue, setNewEditorValue] = React.useState();
const [tableData, setTableData] = React.useState<{ columns: string[]; values: any }>();
const [currentTabIndex, setCurrentTabIndex] = React.useState();
- const [isMenuExpand, setIsMenuExpand] = useState(true);
+ const [isMenuExpand, setIsMenuExpand] = useState(false);
const searchParams = useSearchParams();
const id = searchParams?.get('id');
@@ -419,29 +421,27 @@ function DbEditor() {
return (
-
+
-
-
+