Spyros Quick thought: have you considered handling updates to the Options list when the parent Name changes at runtime, or is that out of scope for this use case?
Creating a Syncfusion MultiSelect Component with Two-Way Binding in Blazor
SpyrosLeader
posted
3 min read
0 Comments
Spyros
•
Thanks for the note I really appreciate it. We're all students of learning, after all.
In this case, the Name value remains static throughout the component’s lifecycle, so updating the Options dynamically isn’t necessary. However, you’re absolutely right: if we ever need to support changes to Name at runtime, we should definitely handle it properly.
Here’s one way to achieve that:
private Picklist _previousName;
public override async Task SetParametersAsync(ParameterView parameters)
{
await base.SetParametersAsync(parameters);
if (!EqualityComparer<Picklist>.Default.Equals(_previousName, Name))
{
_previousName = Name;
PicklistService.Refresh();
Options = PicklistService.DataSource
.Where(x => x.Name == Name)
.ToList();
InternalSelectedValues = Options
.Where(x => SelectedValues.Any(s => s.Value == x.Value))
.ToList();
}
}
Please log in to add a comment.
Please log in to comment on this post.
More Posts
- © 2026 Coder Legion
- Feedback / Bug
- Privacy
- About Us
- Contacts
- Premium Subscription
- Terms of Service
- Refund
- Early Builders
chevron_left
More From Spyros
Related Jobs
- Full Stack Java/Go Developer (Bilingual English/Spanish)Dev Technology · Full time · Arlington, VA
- Full Stack Software Engineer (Components)SPACE EXPLORATION TECHNOLOGIES CORP · Full time · Hawthorne, CA
- Language Data Annotator ( Spanish)Innova software Services Inc · Full time · Canada
Commenters (This Week)
Gift Balogun
6 comments
abarth23
4 comments
Manideep
1 comment
Contribute meaningful comments to climb the leaderboard and earn badges!