mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
address comments from coderabbit.
This commit is contained in:
+6
-3
@@ -680,7 +680,7 @@
|
||||
if (!columnId) return;
|
||||
|
||||
let columnIndex = -1;
|
||||
let columnSchema: SuggestedColumnSchema;
|
||||
let columnSchema: SuggestedColumnSchema = null;
|
||||
|
||||
for (let index = 0; index < customColumns.length; index++) {
|
||||
if (customColumns[index].key === columnId) {
|
||||
@@ -690,10 +690,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (columnIndex !== -1) {
|
||||
customColumns.splice(columnIndex, 1);
|
||||
if (columnIndex === -1 || !columnSchema) {
|
||||
return;
|
||||
}
|
||||
|
||||
// remove the column
|
||||
customColumns.splice(columnIndex, 1);
|
||||
|
||||
// store column with its index for undo
|
||||
columnBeingDeleted = { ...columnSchema, deletedIndex: columnIndex };
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ export const tableColumnSuggestions = writable<TableColumnSuggestions>({
|
||||
context: null,
|
||||
thinking: false,
|
||||
table: null,
|
||||
force: false,
|
||||
force: false
|
||||
});
|
||||
|
||||
export const showIndexesSuggestions = writable<boolean>(false);
|
||||
|
||||
+2
-1
@@ -205,7 +205,7 @@
|
||||
</Container>
|
||||
|
||||
<div class="databases-spreadsheet">
|
||||
{#if hasColumns && hasValidColumns && !$tableColumnSuggestions.force}
|
||||
{#if hasColumns && hasValidColumns && $tableColumnSuggestions.force !== true}
|
||||
{#if data.rows.total}
|
||||
<Divider />
|
||||
<SpreadSheet {data} bind:showRowCreateSheet={$showRowCreateSheet} />
|
||||
@@ -266,6 +266,7 @@
|
||||
$showCreateColumnSheet.show = true;
|
||||
}} />
|
||||
|
||||
<!-- TODO: gate for cloud only! need design -->
|
||||
<EmptySheetCards
|
||||
icon={IconAI}
|
||||
title="Suggest columns"
|
||||
|
||||
Reference in New Issue
Block a user