Skip to content

Commit

Permalink
Fix the demo shiny app with tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Aug 10, 2024
1 parent e30f96a commit dd02403
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ITables ChangeLog

**Fixed**
- We have adjusted the generation of the Polars sample dataframes to fix the CI ([Polars-18130](https://github.com/pola-rs/polars/issues/18130))
- The test on the Shiny app uses `ui.nav_panel` which replaces `ui.nav`


2.1.4 (2024-07-03)
Expand Down
2 changes: 1 addition & 1 deletion tests/sample_python_apps/itables_in_a_shiny_app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Run this app with "shiny run file.py"
from shiny import App, ui

from itables.sample_dfs import get_countries
Expand All @@ -8,4 +9,3 @@
app_ui = ui.page_fluid(ui.HTML(DT(df)))

app = App(app_ui, server=None)
# app.run()
7 changes: 5 additions & 2 deletions tests/sample_python_apps/itables_in_a_shiny_app_with_tabs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Run this app with "shiny run file.py"
from shiny import App, ui

from itables.sample_dfs import get_dict_of_test_dfs
Expand All @@ -6,9 +7,11 @@
app_ui = ui.page_fluid(
# Display the different tables in different tabs
ui.navset_tab(
*[ui.nav(name, ui.HTML(DT(df))) for name, df in get_dict_of_test_dfs().items()]
*[
ui.nav_panel(name, ui.HTML(DT(df)))
for name, df in get_dict_of_test_dfs().items()
]
)
)

app = App(app_ui, server=None)
# app.run()

0 comments on commit dd02403

Please sign in to comment.