Skip to content

Commit 2455c31

Browse files
committed
Add example with update_navs
1 parent c0366a1 commit 2455c31

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

shiny/ui/_navs_dynamic.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ def update_nav_panel(
140140
Note
141141
----
142142
On reveal, the `nav_panel` will not be the active tab. To change the active tab, use `~update_navs()`
143+
For example:
144+
```
145+
@reactive.effect
146+
@reactive.event(input.showTab)
147+
def _():
148+
ui.update_nav_panel("tabset_id", target="Foo", method="show")
149+
ui.update_navs("tabset_id", selected="Foo")
150+
```
143151
144152
See Also
145153
--------

0 commit comments

Comments
 (0)