AmoghAtreya opened a new pull request, #44957:
URL: https://github.com/apache/superset/pull/44957
### SUMMARY
`ZoomConfigControl` was shallow-copying `value` and then assigning into
`newValue.configs.*`, which mutated the shared `configs` object held in Redux
control state. This updates the width/height/slope/exponent handlers to copy
`configs` as well so `onChange` receives a new nested object and the original
prop remains unchanged.
Fixes #44920
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — logic-only immutability fix.
### TESTING INSTRUCTIONS
1. Open Explore with a chart that uses ZoomConfigControl.
2. Change Base width / height / slope / exponent.
3. Confirm the control still updates correctly.
4. Run:
`npm run test --
src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.test.tsx`
### ADDITIONAL INFORMATION
- [x] Has associated issue: #44920
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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]