dosubot[bot] commented on issue #40405: URL: https://github.com/apache/superset/issues/40405#issuecomment-4529184239
<!-- Answer --> Confirmed — this is a valid bug. The `disableSave` state is initialized to `false` on [line 36](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/features/datasets/DuplicateDatasetModal.tsx#L36), and the `useEffect` on [lines 50–53](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/features/datasets/DuplicateDatasetModal.tsx#L50-L53) resets the name to `''` without also setting `disableSave` back to `true`. The fix requires two changes: 1. Initialize `disableSave` to `true` (line 36): ```typescript const [disableSave, setDisableSave] = useState<boolean>(true); ``` 2. Add `setDisableSave(true)` inside the `useEffect` that resets the name: ```typescript setNewDuplicateDatasetName(''); setDisableSave(true); setShow(dataset !== null); ``` Both changes together ensure the button state stays consistent with the empty input on every modal open, not just the first render. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=1d8aad67-44f9-442f-b92b-4c1b790f33e7) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
