mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Merge pull request #2463 from appwrite/fix-dat-800
This commit is contained in:
2 files changed
+14
-5
No files matched your search
+6
@@ -37,6 +37,7 @@
|
||||
IconTrash
|
||||
} from '@appwrite.io/pink-icons-svelte';
|
||||
import { type Columns, databaseColumnSheetOptions } from './store';
|
||||
import { isRelationship } from './rows/store';
|
||||
|
||||
interface MenuItem {
|
||||
label?: string;
|
||||
@@ -122,6 +123,11 @@
|
||||
if (['delete', 'update', 'duplicate-header'].includes(item.action) && isSystemColumn) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// hide sort options for relationship columns
|
||||
if (isRelationship(column) && ['sort-asc', 'sort-desc'].includes(item.action ?? '')) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
+8
-5
@@ -799,10 +799,11 @@
|
||||
</Tooltip>
|
||||
</Spreadsheet.Header.Cell>
|
||||
{:else}
|
||||
{@const structureColumn = $columns.find((col) => col.key === column.id)}
|
||||
<SheetOptions
|
||||
type="header"
|
||||
columnId={column.id}
|
||||
column={$columns.find((col) => col.key === column.id)}
|
||||
column={structureColumn}
|
||||
onSelect={(option, columnId) =>
|
||||
onSelectSheetOption(option, columnId, 'header')}>
|
||||
{#snippet children(toggle)}
|
||||
@@ -824,10 +825,12 @@
|
||||
<!-- array indicator -->
|
||||
{#if column.array}[]{/if}
|
||||
|
||||
<SortButton
|
||||
onSort={sort}
|
||||
column={column.id}
|
||||
state={sortState} />
|
||||
{#if !isRelationship(structureColumn)}
|
||||
<SortButton
|
||||
onSort={sort}
|
||||
column={column.id}
|
||||
state={sortState} />
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
</Spreadsheet.Header.Cell>
|
||||
{/snippet}
|
||||
|
||||
Reference in new issue
Block a user