diff --git a/packages/nc-gui/composables/useViewData.ts b/packages/nc-gui/composables/useViewData.ts index 7393cbb830..5e33983775 100644 --- a/packages/nc-gui/composables/useViewData.ts +++ b/packages/nc-gui/composables/useViewData.ts @@ -63,9 +63,11 @@ export function useViewData( const formatKanbanData = (list: Record[]) => { const groupingField = 'singleSelect2' const groupingFieldColumn = meta?.value?.columns?.filter((f) => f.title === groupingField)[0] as Record - const groupingFieldColumnOptions = [...groupingFieldColumn?.colOptions?.options, { title: 'Uncategorized', order: 0 }].sort( - (a: Record, b: Record) => a.order - b.order, - ) + // TODO: sort by kanban meta + const groupingFieldColumnOptions = [ + ...(groupingFieldColumn?.colOptions?.options ?? []), + { title: 'Uncategorized', order: 0 }, + ].sort((a: Record, b: Record) => a.order - b.order) const initialAcc = groupingFieldColumnOptions.reduce((acc: any, obj: any) => { if (!acc[obj.title]) { acc[obj.title] = []