diff --git a/studio/components/grid/components/editor/SelectEditor.tsx b/studio/components/grid/components/editor/SelectEditor.tsx index f980583fad0..9c65b367e11 100644 --- a/studio/components/grid/components/editor/SelectEditor.tsx +++ b/studio/components/grid/components/editor/SelectEditor.tsx @@ -1,10 +1,10 @@ -import { Listbox } from '@supabase/ui' +import { Select } from 'ui' import { EditorProps } from '@supabase/react-data-grid' import { useTrackedState } from 'components/grid/store' interface SelectEditorProps extends EditorProps { - options: { label: string; value: string }[] + options: { label: string; _value: string }[] } export function SelectEditor({ @@ -19,11 +19,12 @@ export function SelectEditor({ const value = row[column.key as keyof TRow] as unknown as string - function onChange(value: string) { - if (!value || value == '') { + function onChange(event: any) { + debugger + if (!event.target.value || event.target.value == '') { onRowChange({ ...row, [column.key]: null }, true) } else { - onRowChange({ ...row, [column.key]: value }, true) + onRowChange({ ...row, [column.key]: event.target.value }, true) } } @@ -32,7 +33,7 @@ export function SelectEditor({ } return ( - ({ onChange={onChange} onBlur={onBlur} > - - NULL - - {options.map(({ label, value }) => ( - + NULL + {options.map(({ label, _value }) => ( + {label} - + ))} - + ) }