-
Notifications
You must be signed in to change notification settings - Fork 124
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
Keep map selection when searching #3132
Keep map selection when searching #3132
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #3132 +/- ##
==========================================
Coverage 59.37% 59.37%
+ Complexity 4506 4505 -1
==========================================
Files 574 574
Lines 20535 20539 +4
Branches 1019 1019
==========================================
+ Hits 12193 12196 +3
+ Misses 7803 7802 -1
- Partials 539 541 +2
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of introducing a mutable variable that we have to manually remember to set and track, I think it would be better to use the biconsumer version of subscribe on the selectedItem property in initMapSelection. This provides the new and old selected values, then if the new value is null we can select the old value if it is contained by filtered maps.
Effectively moving that logic outside of the setSelectedMap function.
Which is better for the long term as well since most of those properties set in setSelected map will be changed to be bound to derived properties eventually.
…nto bug_fix/#3092_map_search_keeps_map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old item null check is superfluous but that is fine
Fix #3092
Now retains the selected option