EnxDev opened a new pull request, #37007: URL: https://github.com/apache/superset/pull/37007
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY <!--- Describe the change below, including rationale and design decisions --> Fixes the issue where users cannot clear the "Number of top values" field in Matrixify to type a new number. Previously, when deleting digits (e.g., 10 → 1 → empty), the field would snap back to the default value immediately, preventing users from entering a new value. The root cause was that NumberControl dispatched onChange on every keystroke, which triggered Redux validation. When the field became empty (undefined), the validation logic in `getControlState.ts` would reset it to the default value. The fix defers the onChange dispatch to the onBlur event, allowing users to freely edit the field before the value is propagated to Redux. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> - Before https://github.com/user-attachments/assets/b5628bde-eff5-40e8-b2fb-da60e041f764 - After https://github.com/user-attachments/assets/f89f967f-5e3d-4d21-8521-344cceea1895 ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> 1. Navigate to Explore and select a chart with Matrixify enabled 2. Enable Matrixify for rows or columns 3. Select a dimension and choose "Top n" selection mode 4. Try to change the default "10" to a different number: - Delete the "0" → field shows "1" - Delete the "1" → field shows empty (previously snapped back to "10") - Type new number (e.g., "5") → field shows "5" - Click away (blur) → chart updates with new TopN value ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] 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]
