diff --git a/frontend/src/components/TableDesigner.tsx b/frontend/src/components/TableDesigner.tsx index d58cb44f..d8e78611 100644 --- a/frontend/src/components/TableDesigner.tsx +++ b/frontend/src/components/TableDesigner.tsx @@ -635,7 +635,8 @@ const TableDesigner: React.FC<{ tab: TabData; embedded?: boolean }> = ({ tab, em }, []); const focusColumnRow = useCallback((targetKey: string): boolean => { - if (activeKey !== 'columns') return false; + // TDengine's new-table view embeds the columns table in its tdengine tab. + if (activeKey !== 'columns' && activeKey !== 'tdengine') return false; const tableBody = containerRef.current?.querySelector('.ant-table-body') as HTMLElement | null; if (!tableBody) return false; const row = tableBody.querySelector(`tr[data-row-key="${targetKey}"]`) as HTMLTableRowElement | null; @@ -671,7 +672,8 @@ const TableDesigner: React.FC<{ tab: TabData; embedded?: boolean }> = ({ tab, em useEffect(() => { const pendingKey = pendingFocusColumnKeyRef.current; - if (!pendingKey || activeKey !== 'columns') return; + // TDengine's new-table view embeds the columns table in its tdengine tab. + if (!pendingKey || (activeKey !== 'columns' && activeKey !== 'tdengine')) return; let cancelled = false; const tryFocus = () => { @@ -2905,8 +2907,7 @@ END;`; ); - const tdengineAdvancedTabContent = ( -