mirror of
https://github.com/zadam/trilium.git
synced 2026-02-26 08:33:36 +01:00
chore(sql_console): address requested changes
This commit is contained in:
parent
4a82bbb035
commit
fc0ccbfcf5
@ -71,7 +71,10 @@ export default function Tabulator<T>({ className, columns, data, modules, tabula
|
|||||||
|
|
||||||
// Change in data.
|
// Change in data.
|
||||||
useEffect(() => { tabulatorRef.current?.setData(data); }, [ data ]);
|
useEffect(() => { tabulatorRef.current?.setData(data); }, [ data ]);
|
||||||
useEffect(() => { columns && tabulatorRef.current?.setColumns(columns); }, [ data ]);
|
useEffect(() => {
|
||||||
|
if (!columns) return;
|
||||||
|
tabulatorRef.current?.setColumns(columns);
|
||||||
|
}, [ columns ]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={containerRef} className={className} />
|
<div ref={containerRef} className={className} />
|
||||||
|
|||||||
@ -160,20 +160,16 @@ export function SqlTableSchemas({ note }: TypeWidgetProps) {
|
|||||||
|
|
||||||
<span class="sql-table-schemas">
|
<span class="sql-table-schemas">
|
||||||
{schemas.map(({ name, columns }) => (
|
{schemas.map(({ name, columns }) => (
|
||||||
<Fragment key={name}>
|
<Dropdown key={name} text={name} noSelectButtonStyle hideToggleArrow>
|
||||||
<Dropdown text={name} noSelectButtonStyle hideToggleArrow
|
<table className="table-schema">
|
||||||
>
|
{columns.map(column => (
|
||||||
<table className="table-schema">
|
<tr key={column.name}>
|
||||||
{columns.map(column => (
|
<td>{column.name}</td>
|
||||||
<tr key={column.name}>
|
<td>{column.type}</td>
|
||||||
<td>{column.name}</td>
|
</tr>
|
||||||
<td>{column.type}</td>
|
))}
|
||||||
</tr>
|
</table>
|
||||||
))}
|
</Dropdown>
|
||||||
</table>
|
|
||||||
</Dropdown>
|
|
||||||
{" "}
|
|
||||||
</Fragment>
|
|
||||||
))}
|
))}
|
||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user