feat(bases): open detail modal for cards created via per-column '+ New'

This commit is contained in:
Philipinho
2026-05-24 16:15:11 +01:00
parent 6cdceede0b
commit c91f89a055
@@ -129,7 +129,7 @@ export function BaseKanban({
], ],
); );
const handleAddCard = (columnKey: string) => { const handleAddCard = async (columnKey: string) => {
if (!groupByPropertyId) return; if (!groupByPropertyId) return;
const cells = const cells =
columnKey === NO_VALUE_CHOICE_ID columnKey === NO_VALUE_CHOICE_ID
@@ -137,11 +137,16 @@ export function BaseKanban({
: { [groupByPropertyId]: columnKey }; : { [groupByPropertyId]: columnKey };
const column = columns.find((c) => c.key === columnKey); const column = columns.find((c) => c.key === columnKey);
const afterRowId = column?.rows[column.rows.length - 1]?.id; const afterRowId = column?.rows[column.rows.length - 1]?.id;
createRowMutation.mutate({ try {
pageId: base.id, const newRow = await createRowMutation.mutateAsync({
cells, pageId: base.id,
afterRowId, cells,
}); afterRowId,
});
onCardClick(newRow.id);
} catch {
// mutation already shows an error toast.
}
}; };
const handleColumnReorder = useCallback( const handleColumnReorder = useCallback(