mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: sort options on related columns.
This commit is contained in:
+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;
|
||||
|
||||
Reference in New Issue
Block a user