-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into improve_dark_mode
- Loading branch information
Showing
9 changed files
with
66 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
10 changes: 8 additions & 2 deletions
10
tests/sample_python_apps/itables_in_a_shiny_app_with_tabs.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
# Run this app with "shiny run file.py" | ||
from shiny import App, ui | ||
|
||
from itables.sample_dfs import get_dict_of_test_dfs | ||
from itables.shiny import DT | ||
|
||
try: | ||
# This one is not available on the CI (Python 3.8) | ||
ui_nav = ui.nav | ||
except AttributeError: | ||
ui_nav = ui.nav_panel | ||
|
||
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(name, ui.HTML(DT(df))) for name, df in get_dict_of_test_dfs().items()] | ||
) | ||
) | ||
|
||
app = App(app_ui, server=None) | ||
# app.run() |
This file contains 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