Database diagrams editor that allows you to visualize and design your DB with a single query.
TypeScript databasedbdb-migrationeditorerdmariadbmssqlmysqlpostgresqlreactreact-flowschema-migrationssqlsqlitetypescriptvisualizationxyflow
keep index order
Guy Ben-Aharonc89d9af8d88d
diff --git a/src/components/select-box/select-box.tsx b/src/components/select-box/select-box.tsxindex bcc9094f..88f7c720 100644--- a/src/components/select-box/select-box.tsx+++ b/src/components/select-box/select-box.tsx@@ -39,6 +39,7 @@ interface SelectBoxProps {deselectAll?: boolean;clearText?: string;showClear?: boolean;+ keepOrder?: boolean;}export const SelectBox = React.forwardRef<HTMLInputElement, SelectBoxProps>(@@ -57,6 +58,7 @@ export const SelectBox = React.forwardRef<HTMLInputElement, SelectBoxProps>(deselectAll,clearText,showClear,+ keepOrder,},ref) => {@@ -99,6 +101,14 @@ export const SelectBox = React.forwardRef<HTMLInputElement, SelectBoxProps>((option) =>Array.isArray(value) && value.includes(option.value))+ .sort((a, b) => {+ if (keepOrder && Array.isArray(value)) {+ return (+ value.indexOf(a.value) - value.indexOf(b.value)+ );+ }+ return 0;+ }).map((option) => (<spankey={option.value}@@ -116,7 +126,7 @@ export const SelectBox = React.forwardRef<HTMLInputElement, SelectBoxProps>(</span></span>)),- [options, value, handleSelect, oneLine]+ [options, value, handleSelect, oneLine, keepOrder]);const isAllSelected = React.useMemo(diff --git a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-index/table-index.tsx b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-index/table-index.tsxindex 034269be..55204f0a 100644--- a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-index/table-index.tsx+++ b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-index/table-index.tsx@@ -52,6 +52,7 @@ export const TableIndex: React.FC<TableIndexProps> = ({emptyPlaceholder={t('side_panel.tables_section.table.no_types_found')}+ keepOrder/><div className="flex shrink-0"><Popover>