Skip to content

Commit 61fcebc

Browse files
hrq-chiuchiHenrique Chiuchi
andauthored
fix(data): stop forcing every new table to kind 'data' (CoreBunch#216)
createTable in useDataWorkspace hard-coded kind: 'data' on every createCmsDataTable call, silently discarding the Kind selection made in NewTableDialog. Choosing "Post type" in the dialog always produced a plain data table with no title/slug/body/routing. Pass the dialog's input straight through instead of overriding it. Co-authored-by: Henrique Chiuchi <henriquechiuchi@outlook.com>
1 parent 0d5e4b6 commit 61fcebc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/admin/pages/data/hooks/useDataWorkspace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export function useDataWorkspace({ shouldLoadRows }: DataWorkspaceOptions): Data
246246

247247
const createTable = async (input: CreateDataTableInput): Promise<DataTable> => {
248248
setTablesError(null)
249-
const table = await createCmsDataTable({ ...input, kind: 'data' })
249+
const table = await createCmsDataTable(input)
250250
// Newly created table has no rows yet.
251251
setTables((current) => [...current, { ...table, rowCount: 0 }])
252252
setSelectedTableId(table.id)

0 commit comments

Comments
 (0)