-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(data frame): Add .data_view_rows()
, .sort()
, .filter()
, .update_sort()
, and .update_filter()
; cell_selection()
no longer returns None
#1374
Merged
Conversation
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
…contained in the index
* render_df_bugs: Update _renderer.py Restore `input.<ID>_selected_rows()`. Add tests Make sure the index being subsetted is less than the row length, not contained in the index Update CHANGELOG.md Only subset the selected data if the index row exists!
schloerke
commented
May 14, 2024
wch
reviewed
May 14, 2024
schloerke
commented
May 14, 2024
schloerke
commented
May 14, 2024
…r` for consistency
.data_view_rows()
, .input_column_sort()
, .input_column_filter()
, .update_column_sort()
, and .update_column_filter()
.data_view_rows()
, .input_sort()
, .input_filter()
, .update_sort()
, and .update_filter()
…pe; Change row order to data view row order (#1376)
…lative path (not a subpath like `SUB_FILE`)
* main: test(browsers): Unskip webkit tests (#1431) chore: update shiny-vscode extension ID (#1434) Add setuptools as an install requirement in Python 3.12 and above (#1435) Bump version to 0.10.2.9000 v0.10.2 release candidate Use `output_code()` and `render.code()` (#1421) Fix: spinners only show for a split second (#1429) Bump version to 0.10.1.9000 Bump version to 0.10.1 Update CHANGELOG.md (#1419) Update cpu info example bug(CI): Only update the shiny submodule when making the dev docs (#1417) Update shiny CSS (#1415) Bump version to 0.10.0.9000 for development Bump version to 0.10.0
.data_view_rows()
, .input_sort()
, .input_filter()
, .update_sort()
, and .update_filter()
.data_view_rows()
, .sort()
, .filter()
, .update_sort()
, and .update_filter()
.data_view_rows()
, .sort()
, .filter()
, .update_sort()
, and .update_filter()
.data_view_rows()
, .sort()
, .filter()
, .update_sort()
, and .update_filter()
; cell_selection()
no longer returns None
schloerke
added a commit
that referenced
this pull request
Jun 3, 2024
* main: feat(data frame): Add `.data_view_rows()`, `.sort()`, `.filter()`, `.update_sort()`, and `.update_filter()`; `cell_selection()` no longer returns `None` (#1374)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1351
Fixes #1345
Fixes #1378
Related to #1345 (comment)
Related discussion #1345 (comment) with @pstorozenko
Final solution:
Expose.data_view_info()
reactive value which returnsDataViewInfo
which is defined as a list of data view information.Expose individual reactive values for the user to access on their own:
.data_view_rows: Calc_[tuple[int]]
.sort: Calc_[ListOrTuple[ColumnSort]]
.filter: Calc_[ListOrTuple[ColumnFilter]]
.update_sort(self, sort: ListOrTuple[ColumnSort | int] | ColumnSort | int | None)
int
values are upgraded to{col: <INT>, desc: bool}
;desc
defaults to True if column<INT>
is number like, otherwiseFalse
..update_filter(self, sort: ListOrTuple[ColumnFilter] | None)
From #1376
Previous return type for
.input_cell_selection()
:New return type for
.cell_selection()
:If
type = "none"
,rows
andcols
are empty tuples.If
type = "row"
,cols
is all column numbers of the data.If
type = "col"
,rows
is all row numbers of the data view rowsIf
type = "rect"
, all rows and cols are provided (no longer just min/max values).If
.cell_selection()
receives an empty selection (e.g.type="row"
androws=[]
, ortype="none"
), then the return value will beNone
as no selection is currently taking place.Previous user interaction:
New user interaction: