-
-
Notifications
You must be signed in to change notification settings - Fork 999
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(module:select): Select with group refresh on datasource change #2048
Merged
ElderJames
merged 6 commits into
ant-design-blazor:master
from
anddrzejb:selectWithGroup
Oct 29, 2021
Merged
fix(module:select): Select with group refresh on datasource change #2048
ElderJames
merged 6 commits into
ant-design-blazor:master
from
anddrzejb:selectWithGroup
Oct 29, 2021
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
Codecov Report
@@ Coverage Diff @@
## master #2048 +/- ##
==========================================
+ Coverage 25.76% 27.62% +1.85%
==========================================
Files 489 512 +23
Lines 32243 24574 -7669
Branches 0 238 +238
==========================================
- Hits 8309 6788 -1521
+ Misses 23934 17750 -6184
- Partials 0 36 +36
Continue to review full report at Codecov.
|
ElderJames
approved these changes
Oct 29, 2021
ElderJames
pushed a commit
that referenced
this pull request
Apr 23, 2022
…2048) * test: fix net6 tests * fix(module:select): group refresh on option change
ElderJames
pushed a commit
that referenced
this pull request
Apr 30, 2022
…2048) * test: fix net6 tests * fix(module:select): group refresh on option change
ElderJames
pushed a commit
that referenced
this pull request
Sep 6, 2022
…2048) * test: fix net6 tests * fix(module:select): group refresh on option change
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.
🤔 This is a ...
🔗 Related issue link
Fixes #2031
💡 Background and solution
There were 2 issues here, both originating form the fact that the consumer was setting the
DataSource
from the consuming component'sOnAfterRender
lifecycle method.SelectOptionItems
were loaded with items after rendering. So items did not have anyElementReference
set. When user was clicking on theSelect
, the method was called to scroll to either selected or first element in the list. But because there was noElementRefernece
set yet, the framework was throwing theNullReferenceException
. My approach here was to check ifElementRefernece.Id
is null. If it is, callStateHasChanged()
.CascadingValue
havingFixed
set. So when theDataSource
changed, theSelectOptionGroup
was never informed and never re-rendered the list.I also fixed 2 tests that would fail once we move to net6.
📝 Changelog
☑️ Self Check before Merge