suvankardas216 opened a new pull request, #42217:
URL: https://github.com/apache/superset/pull/42217

   Fixes #40405 
   
   ## Summary
   
   This PR fixes an issue where the **Duplicate** button is enabled when the 
Duplicate Dataset modal is first opened, even though the dataset name is empty.
   
   ## Root Cause
   
   `disableSave` was initialized to `false`, and the modal's `useEffect` reset 
the dataset name but did not reset the disabled state. As a result, the 
Duplicate button could remain enabled with an empty input.
   
   ## Changes
   
   - Initialize `disableSave` to `true`
   - Reset `disableSave` inside `useEffect` whenever the modal opens
   - Add a regression test to verify the Duplicate button is disabled on 
initial render
   
   ## Testing
   
   Executed:
   
   ```bash
   npm test -- src/features/datasets/DuplicateDatasetModal.test.tsx
   ```
   
   Result:
   
   - Test Suites: 1 passed
   - Tests: 10 passed


-- 
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]

Reply via email to