You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/10/06 16:20:37 UTC

[GitHub] [superset] lyndsiWilliams commented on a diff in pull request #21557: fix: Dataset creation header is now uneditable and holds proper default values

lyndsiWilliams commented on code in PR #21557:
URL: https://github.com/apache/superset/pull/21557#discussion_r989250489


##########
superset-frontend/src/views/CRUD/data/dataset/AddDataset/Header/index.tsx:
##########
@@ -59,21 +59,23 @@ const renderOverlay = () => (
 
 export default function Header({
   setDataset,
-  datasetName,
+  title,
+  schema,
 }: {
   setDataset: React.Dispatch<DSReducerActionType>;
-  datasetName: string;
+  title: string;
+  schema?: string | null | undefined;
 }) {
   const editableTitleProps = {
-    title: datasetName,
-    placeholder: t('Add the name of the dataset'),
+    title: schema ? title : t('New dataset'),
+    placeholder: t('New dataset'),

Review Comment:
   Updated in [`this commit`](https://github.com/apache/superset/pull/21557/commits/e9f6eb28b1a684b08eb097d43dee99034d775df8)



##########
superset-frontend/src/views/CRUD/data/dataset/AddDataset/Header/index.tsx:
##########
@@ -59,21 +59,23 @@ const renderOverlay = () => (
 
 export default function Header({
   setDataset,
-  datasetName,
+  title,
+  schema,
 }: {
   setDataset: React.Dispatch<DSReducerActionType>;
-  datasetName: string;
+  title: string;
+  schema?: string | null | undefined;
 }) {
   const editableTitleProps = {
-    title: datasetName,
-    placeholder: t('Add the name of the dataset'),
+    title: schema ? title : t('New dataset'),

Review Comment:
   Updated in [`this commit`](https://github.com/apache/superset/pull/21557/commits/e9f6eb28b1a684b08eb097d43dee99034d775df8)



##########
superset-frontend/src/views/CRUD/data/dataset/AddDataset/index.tsx:
##########
@@ -71,7 +71,11 @@ export default function AddDataset() {
   >(datasetReducer, null);
 
   const HeaderComponent = () => (
-    <Header setDataset={setDataset} datasetName={dataset?.dataset_name ?? ''} />
+    <Header
+      setDataset={setDataset}
+      title={dataset?.table_name ?? 'New dataset'}

Review Comment:
   Updated in [`this commit`](https://github.com/apache/superset/pull/21557/commits/e9f6eb28b1a684b08eb097d43dee99034d775df8)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org