Skip to content
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

Fix serialization issue #303

Merged
merged 2 commits into from
Mar 7, 2022

Conversation

martinRenou
Copy link
Member

The renderers serialization was not returning valid JSON, this PR fixes it

@martinRenou martinRenou force-pushed the serialization_issue branch 2 times, most recently from cc2c3d0 to 61e0972 Compare March 4, 2022 09:40
Signed-off-by: martinRenou <martin.renou@gmail.com>
@martinRenou martinRenou force-pushed the serialization_issue branch from 61e0972 to 9e3b226 Compare March 4, 2022 09:41
@@ -336,14 +348,17 @@ class DataGrid(DOMWidget):
selection_mode = Enum(
default_value="none", values=["row", "column", "cell", "none"]
).tag(sync=True)
selections = List(Dict()).tag(sync=True, **widget_serialization)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm removing the widgets serializer here, we don't need it as it's a simple dictionary?

auto_fit_columns = Bool(False).tag(sync=True)
auto_fit_params = Dict(
{"area": "all", "padding": 30, "numCols": None}, allow_none=False
).tag(sync=True, **widget_serialization)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question here?

Copy link
Member

@ibdafna ibdafna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and everything works as expected. Looks great! Thank you ❤️‍🔥

@ibdafna ibdafna merged commit ece2342 into jupyter-widgets:main Mar 7, 2022
@martinRenou martinRenou deleted the serialization_issue branch March 7, 2022 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants