yousoph opened a new pull request, #40696: URL: https://github.com/apache/superset/pull/40696
### SUMMARY Fixes a bug where editing a dashboard divider's title/description in the "Add or edit display controls" modal causes the panel to revert to the first-saved values on subsequent saves, and the Save button to start disabled on every reopen after the first save. **Root cause (two-part):** `DividerConfigForm` never calls `handleModifyItem` when the user types — unlike `FiltersConfigForm`, which calls it via its `formChanged`/`onModifyFilter` path. This caused two symptoms: 1. **Save button disabled on reopen.** After the first save, `changes.modified` is reset to `[]`. On modal reopen the save button's `canSave` check requires `changes.modified.length > 0`, which never becomes true because no code marks the divider modified when the user types. 2. **Values revert on save.** When save is triggered, `resetForm(true)` resets all antd fields back to `initialValue`. Since the divider was never added to `changes.modified`, its updated value is excluded from the save payload and the display reverts to the previously saved title. **Fix:** In `FiltersConfigModal.tsx`, update `handleValuesChange` (wired to `Form.onValuesChange`) to detect when a changed field key belongs to a divider (`NATIVE_FILTER_DIVIDER-*` or `CHART_CUSTOMIZATION_DIVIDER-*`) and call `handleModifyItem` for that ID. This mirrors the existing pattern in `FiltersConfigForm` without requiring changes to `DividerConfigForm` or any renderer components. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — logic fix, no visual change to the modal layout. ### TESTING INSTRUCTIONS 1. Open a dashboard in edit mode 2. Click "Add or edit display controls" to open the filters/display modal 3. Add a new **Divider** item from the left sidebar 4. Enter a title (e.g. "First Title") and click **Save** — first save should work 5. Re-open the modal; confirm the divider shows "First Title" 6. Edit the title to "Second Title" — the **Save** button should enable immediately after typing 7. Click **Save** — confirm the panel shows "Second Title" (no revert to "First Title") 8. Re-open and confirm "Second Title" persists Repeat with a chart customization divider (`CHART_CUSTOMIZATION_DIVIDER-*`) to confirm both prefixes are covered. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [x] 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]
