Skip to content

Commit 4b9c9d6

Browse files
committed
allow inputs
1 parent b71613d commit 4b9c9d6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1616
## Added
1717

1818
- [#2630](https://github.com/plotly/dash/pull/2630) New layout hooks in the renderer
19-
- [#2647](https://github.com/plotly/dash/pull/2647) `routing_callback_states` allowing to pass more State arguments to the pages routing callback
19+
- [#2647](https://github.com/plotly/dash/pull/2647) `routing_callback_inputs` allowing to pass more State arguments to the pages routing callback
2020

2121

2222
## [2.12.1] - 2023-08-16

dash/dash.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,10 @@ class Dash:
348348
javascript functions. To hook into the layout, use dict keys "layout_pre" and
349349
"layout_post". To hook into the callbacks, use keys "request_pre" and "request_post"
350350
351-
:param routing_callback_states: When using Dash pages (use_pages=True), allows to
351+
:param routing_callback_inputs: When using Dash pages (use_pages=True), allows to
352352
add new States to the routing callback, to pass additional data to the layout
353353
functions. The syntax for this parameter is a dict of State objects:
354-
`routing_callback_states={"language": State("language", "value")}`
354+
`routing_callback_inputs={"language": Input("language", "value")}`
355355
This allows things like (non-exhaustive list):
356356
* A language dropdown that will be passed to every layout function,
357357
for internationalisation
@@ -395,7 +395,7 @@ def __init__( # pylint: disable=too-many-statements
395395
background_callback_manager=None,
396396
add_log_handler=True,
397397
hooks: Union[RendererHooks, None] = None,
398-
routing_callback_states: Optional[Dict[str, State]] = None,
398+
routing_callback_inputs: Optional[Dict[str, Union[Input, State]]] = None,
399399
**obsolete,
400400
):
401401
_validate.check_obsolete(obsolete)
@@ -471,7 +471,7 @@ def __init__( # pylint: disable=too-many-statements
471471

472472
self.pages_folder = str(pages_folder)
473473
self.use_pages = (pages_folder != "pages") if use_pages is None else use_pages
474-
self.routing_callback_states = routing_callback_states or {}
474+
self.routing_callback_inputs = routing_callback_inputs or {}
475475

476476
# keep title as a class property for backwards compatibility
477477
self.title = title
@@ -2095,7 +2095,7 @@ def router():
20952095
inputs={
20962096
"pathname_": Input(_ID_LOCATION, "pathname"),
20972097
"search_": Input(_ID_LOCATION, "search"),
2098-
**self.routing_callback_states,
2098+
**self.routing_callback_inputs,
20992099
},
21002100
prevent_initial_call=True,
21012101
)

0 commit comments

Comments
 (0)