Close feature gaps between clientside_callback and regular callbacks#3897
Open
T4rk1n wants to merge 1 commit into
Open
Close feature gaps between clientside_callback and regular callbacks#3897T4rk1n wants to merge 1 commit into
T4rk1n wants to merge 1 commit into
Conversation
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Add support to
clientside_callbackfor features that previously only worked with server-side@callback: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 orClientsideFunction) whose return value becomes the outputs (undefined -> no_update).callback_contextparity:triggered_prop_ids,args_grouping,outputs_grouping,using_args_grouping,using_outputs_grouping.optional=passthrough.clientside_callbacknow raisesCallbackExceptionfor unsupported kwargs (background=, progress=, cancel=, manager=, ...) instead of silently ignoring them.