From 31296ef051bef6d469942ea94e0205e4a897953a Mon Sep 17 00:00:00 2001 From: AnushDeokar Date: Thu, 14 Sep 2023 01:29:10 +0530 Subject: [PATCH] tablename first click error fixed --- src/components/TableSettingsDialog/TableName.tsx | 2 +- src/components/TableSettingsDialog/form.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/TableSettingsDialog/TableName.tsx b/src/components/TableSettingsDialog/TableName.tsx index 1eebd2d9..36875c11 100644 --- a/src/components/TableSettingsDialog/TableName.tsx +++ b/src/components/TableSettingsDialog/TableName.tsx @@ -27,7 +27,7 @@ export default function TableName({ watchedField, ...props }: ITableNameProps) { onChange(startCase(watchedValue)); } else if (typeof value === "string") { // otherwise if table name is valid, set watched value to table name - onChange(value.trim()); + onChange(startCase(value.trim())); } } }, [watchedValue, disabled, onChange, value]); diff --git a/src/components/TableSettingsDialog/form.tsx b/src/components/TableSettingsDialog/form.tsx index 9d611e06..31802e14 100644 --- a/src/components/TableSettingsDialog/form.tsx +++ b/src/components/TableSettingsDialog/form.tsx @@ -213,7 +213,7 @@ export const tableSettings = ( name: "name", label: "Table name", required: true, - watchedField: "collection", + watchedField: "name", assistiveText: "User-facing name for this table", autoFocus: true, gridCols: { xs: 12, sm: 6 },