Files
supabase/apps/studio/components/grid/constants.ts
T
Terry SuttonandJoshen Lim d6f9cb53f9 Set the primary key as the default sort if no other sort exists (#27097)
* Set the primary key as the default sort if no other sort exists

* Rename

* Add contextual toast messages when trying to update/delete row on table with no PKs

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-06-19 14:58:48 +08:00

15 lines
456 B
TypeScript

export const COLUMN_MIN_WIDTH = 100
export const STORAGE_KEY_PREFIX = 'supabase_grid'
export const TOTAL_ROWS_INITIAL = -1
export const TOTAL_ROWS_RESET = -2
export const SELECT_COLUMN_KEY = 'supabase-grid-select-row'
export const ADD_COLUMN_KEY = 'supabase-grid-add-column'
const RLS_ACKNOWLEDGED_KEY = 'supabase-acknowledge-rls-warning'
export const rlsAcknowledgedKey = (tableID?: string | number) =>
`${RLS_ACKNOWLEDGED_KEY}-${String(tableID)}`