Skip to content

Close feature gaps between clientside_callback and regular callbacks#3897

Open
T4rk1n wants to merge 1 commit into
devfrom
feat/close-clientside-gap
Open

Close feature gaps between clientside_callback and regular callbacks#3897
T4rk1n wants to merge 1 commit into
devfrom
feat/close-clientside-gap

Conversation

@T4rk1n

@T4rk1n T4rk1n commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Add support to clientside_callback for features that previously only worked with server-side @callback:

  • Flexible/grouped signatures: output=/inputs=/state= may be dicts or nested lists. Dict groupings pass a single destructurable object to the JS function; the return value is validated against the output grouping. Grouping indices are serialized into the callback spec only when non-trivial, so flat signatures keep identical specs.
  • running=: on/off side updates applied around execution, reverting on success, PreventUpdate, and error.
  • on_error=: JS error handler (source string or ClientsideFunction) whose return value becomes the outputs (undefined -> no_update).
  • callback_context parity: triggered_prop_ids, args_grouping, outputs_grouping, using_args_grouping, using_outputs_grouping.
  • optional= passthrough.

clientside_callback now raises CallbackException for unsupported kwargs (background=, progress=, cancel=, manager=, ...) instead of silently ignoring them.

Add support to clientside_callback for features that previously only
worked with server-side @callback:

- Flexible/grouped signatures: output=/inputs=/state= may be dicts or
  nested lists. Dict groupings pass a single destructurable object to
  the JS function; the return value is validated against the output
  grouping. Grouping indices are serialized into the callback spec only
  when non-trivial, so flat signatures keep identical specs.
- running=: on/off side updates applied around execution, reverting on
  success, PreventUpdate, and error.
- on_error=: JS error handler (source string or ClientsideFunction)
  whose return value becomes the outputs (undefined -> no_update).
- callback_context parity: triggered_prop_ids, args_grouping,
  outputs_grouping, using_args_grouping, using_outputs_grouping.
- optional= passthrough.

clientside_callback now raises CallbackException for unsupported kwargs
(background=, progress=, cancel=, manager=, ...) instead of silently
ignoring them.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant