fix(ui): stringify selected in update_checkbox_group/update_radio_buttons - #2362
Closed
eeshsaxena wants to merge 2 commits into
Closed
fix(ui): stringify selected in update_checkbox_group/update_radio_buttons#2362eeshsaxena wants to merge 2 commits into
eeshsaxena wants to merge 2 commits into
Conversation
serialize_frame and the cell-patch scatter path accessed narwhals columns via data[col_name]. For a numeric column name (e.g. 0) narwhals treats that as positional row access and returns a row frame, so serialize_dtype received a DataFrame instead of a Series and raised an obscure AttributeError. Use get_column(col_name) in both places.
…tons Choice values render as strings in the DOM, but the update message sent selected unchanged, so integer choice keys (accepted by input_checkbox_group) never matched the option values on update. Stringify the selected values sent to the client. Closes posit-dev#2272
Collaborator
|
Thanks. Appears this also includes the fix being proposed here? #2358 |
Author
This file contains hidden or 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
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.
Closes #2272.
input_checkbox_groupaccepts integer choice keys inselected, butupdate_checkbox_group/update_radio_buttonssent them to the client unchanged, so integer keys never matched the (string) option values on update. Stringify the selected values sent to the client. Adds unit tests (this update path previously had only browser tests).