-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'data_view_meta' into df_input_cell_selection
* data_view_meta: Add demo apps for `update_sort()` and `update_filter()` Add `update_sort()` and `update_filter()` to DF bug(output transformer): fix transformer auto-registration (#1394) fix: Add wait till pulse animation has started (#1393) bug(test-deploy): Add retries for deploy tests (#1392) Add busy indicator tests (#1391) Yield to give "synchronous" writes a chance to complete (#1388) chore(busy indicator): Update busy indicator css files (#1389) `ColumnFilter` and `ColumnSort` should use `col: num` and not `id: str` for consistency Lints Have `.data_view()` use `.data_view_info()` information for consistent subsetting feat(cli): Add `shiny --version` (#1387) fix(selectize): Accept jsonifiable values in `options` dictionary (#1382) bug(data frame): Use `<ID>_data_view_rows` (#1386) test(data frame): Verify that data frame's outputs are reset before moving forward (#1383) Send busy/idle at the right times (#1380) feat(data frame): Restore `input.<ID>_selected_rows()`. Rename `input.<ID>_data_view_indices` to `input.<ID>_data_view_rows` (#1377) Apply suggestions from code review
- Loading branch information
Showing
48 changed files
with
878 additions
and
140 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from shared import mtcars | ||
|
||
from shiny import App, reactive, render, ui | ||
|
||
app_ui = ui.page_fillable( | ||
ui.card( | ||
ui.layout_column_wrap( | ||
ui.input_action_button("btn", "Filter on columns 0, 1, and 3"), | ||
ui.input_action_button("reset", "Reset column filters"), | ||
fill=False, | ||
), | ||
ui.output_data_frame("df"), | ||
), | ||
) | ||
|
||
|
||
def server(input, output, session): | ||
data = reactive.value(mtcars.iloc[:, range(4)]) | ||
|
||
@render.data_frame | ||
def df(): | ||
return render.DataGrid(data(), filters=True) | ||
|
||
@reactive.effect | ||
@reactive.event(input.reset) | ||
async def _(): | ||
await df.update_filter(None) | ||
|
||
@reactive.effect | ||
@reactive.event(input.btn) | ||
async def _(): | ||
await df.update_filter( | ||
[ | ||
{"col": 0, "value": [19, 25]}, | ||
{"col": 1, "value": [None, 6]}, | ||
{"col": 3, "value": [100, None]}, | ||
] | ||
) | ||
|
||
|
||
app = App(app_ui, server, debug=True) |
Oops, something went wrong.