feat(side-panel): Add functionality of order tables by drag & drop (#425)

This commit is contained in:
Zer0S2m
2024-11-28 20:07:51 +03:00
committed by GitHub
parent a8fe491c1b
commit a0e966b64f
7 changed files with 146 additions and 30 deletions

View File

@@ -27,6 +27,7 @@ export interface ChartDBProviderProps {
diagram?: Diagram;
readonly?: boolean;
}
export const ChartDBProvider: React.FC<
React.PropsWithChildren<ChartDBProviderProps>
> = ({ children, diagram, readonly }) => {
@@ -310,6 +311,7 @@ export const ChartDBProvider: React.FC<
color: randomColor(),
createdAt: Date.now(),
isView: false,
order: tables.length,
...attributes,
};
await addTable(table);