You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sadpandajoe (via GitHub)" <gi...@apache.org> on 2026/10/02 21:49:16 UTC

[I] ColumnConfigControl ControlForm: two quick field edits within the debounce window lose the first edit [superset]

sadpandajoe opened a new issue, #44922:
URL: https://github.com/apache/superset/issues/44922

   
   ### Bug description
   
   `ControlForm` shares one lodash-debounced `onChange` per delay and builds each payload as `{ ...value, [name]: fieldValue }` from the `value` prop at render time. If a second field is edited before the first edit's debounce (250 ms `FAST_DEBOUNCE`) fires and before the parent has re-rendered with the new `value`, the second call replaces the pending first call and its payload is built from the stale `value`, so the first field's edit is dropped.
   
   Steps to reproduce: open a column's settings popover (e.g. a table column's Customize options), type in one text field (e.g. custom column name) and immediately (<250 ms) change another field (e.g. a toggle/number format). Only the last field's change is saved; the first reverts.
   
   Expected: both edits are kept (merge into the latest pending value, or flush the pending call before the next).
   
   ### Where
   
   `superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx`
   - L73-L80 `debouncedOnChange` (one `debounce(onChange, FAST_DEBOUNCE)` shared by all items)
   - L107-L116 per-item handler: `debouncedOnChange[debounceDelay]({ ...value, [name]: fieldValue })`
   
   ### Suggested fix
   
   Keep a ref of the latest pending form value, merge `[name]: fieldValue` into it on every edit, and debounce a call that sends the merged ref (reset it after firing).
   
   ### Found by
   
   Found while adding React Testing Library coverage for Explore controls (all line numbers are against `master` at `bc3698b5d6`).
   


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] ColumnConfigControl ControlForm: two quick field edits within the debounce window lose the first edit [superset]

Posted by "minwookshin (via GitHub)" <gi...@apache.org>.
minwookshin commented on issue #44922:
URL: https://github.com/apache/superset/issues/44922#issuecomment-5964607640

   I’m looking at merging pending field edits before notifying the parent, with regressions for mixed debounce delays and unmount cleanup. I checked #44843 and #44668 and will keep this scoped to the lost-update bug.
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] ColumnConfigControl ControlForm: two quick field edits within the debounce window lose the first edit [superset]

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe closed issue #44922: ColumnConfigControl ControlForm: two quick field edits within the debounce window lose the first edit
URL: https://github.com/apache/superset/issues/44922


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org