You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/changelog.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,9 @@ ITables ChangeLog
8
8
- We have fixed a HTML pop up warning when displaying Pandas Style objects in Quarto ([#317](https://github.com/mwouts/itables/issues/317))
9
9
- The dependencies of the Streamlit component have been updated ([#323](https://github.com/mwouts/itables/pull/323))
10
10
11
+
**Added**
12
+
- We have documented how to use the `ITable` widget in a Shiny application and deployed a sample app ([#276](https://github.com/mwouts/itables/issues/276))
Compared to `show`, the `ITable` widget has the same limitations as the [Streamlit component](streamlit.md#limitations),
102
+
e.g. structured headers are not available, you can't pass JavaScript callback, etc.
103
+
104
+
The good news is that if you only want to _display_ the table, you do not need
105
+
the `ITable` widget. You can render the table using `HTML(DT(...))` as here:
106
+
4
107
```python
5
108
from shiny import ui
6
109
@@ -9,14 +112,17 @@ from itables.shiny import DT, init_itables
9
112
10
113
# Load the datatables library and css from the ITables package
11
114
# (use connected=True if you prefer to load it from the internet)
12
-
ui.HTML(init_itables(connected=False))
115
+
ui.HTML(init_itables())
13
116
14
117
# Render the table with DT
15
118
ui.HTML(DT(get_countries(html=False)))
16
119
```
17
120
18
-
If you enable row selection and set an id on your table, e.g. `DT(df, table_id="my_table", select=True)` then
19
-
ITables will provide the list of selected rows at `input.my_table_selected_rows()` (replace `my_table` with your
20
-
own table id).
121
+
An example for an application that uses `DT` is available at [`app.py`](https://github.com/mwouts/demo_itables_in_shiny-py/blob/main/itables_DT/app.py)
122
+
(Shiny Express) or [`app-core.py`](https://github.com/mwouts/demo_itables_in_shiny-py/blob/main/itables_DT/app-core.py)
123
+
(Shiny Core).
21
124
22
-
See also our [tested examples](https://github.com/mwouts/itables/tree/main/tests/sample_python_apps).
0 commit comments