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

Correctly detect max depth of NestedSelect if level is empty #7194

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

philippjfr
Copy link
Member

Empty levels were not treated correctly, resulting in errors when a leaf was empty and incorrectly treating a two-level NestedSelect as a single level

@philippjfr philippjfr added this to the v1.5.0 milestone Aug 27, 2024
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.23%. Comparing base (4907011) to head (26a00e0).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7194      +/-   ##
==========================================
- Coverage   82.23%   82.23%   -0.01%     
==========================================
  Files         331      331              
  Lines       49359    49360       +1     
==========================================
- Hits        40591    40589       -2     
- Misses       8768     8771       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@philippjfr philippjfr merged commit d0976d8 into main Aug 27, 2024
15 of 16 checks passed
@philippjfr philippjfr deleted the nested_select_fix branch August 27, 2024 14:28
@@ -500,7 +509,7 @@ def test_nested_select_partial_options_set(document, comm):
select.options = {"Ben": []}
assert select._widgets[0].value == 'Ben'
assert select._widgets[0].visible
assert select.value == {0: 'Ben'}
assert select.value == {0: 'Ben', 1: None}
Copy link
Contributor

@ahuang11 ahuang11 Aug 29, 2024

Choose a reason for hiding this comment

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

I'm wondering if this 1: None is correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems correct to me, there are two levels after all, even if one of them is empty.

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