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
2 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.
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.
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
47Posts
169Comments
113Connections
Passionate about building robust and scalable software solutions with a focus on .NET technologies. ... Show morePassionate about building robust and scalable software solutions with a focus on .NET technologies. With extensive experience in leading teams, designing systems, and mentoring developers, I strive to deliver high-quality, efficient, and maintainable code. I share insights, tutorials, and best practices to help others grow in their software engineering journey. Always eager to learn, explore, and contribute to the tech community
https://www.linkedin.com/in/spyros-ponaris-913a6937/ Show less
https://www.linkedin.com/in/spyros-ponaris-913a6937/ Show less
More From Spyros
Related Jobs
- Software Engineer, Test & Infrastructure II (Bilingual Spanish)Vail Systems · Full time · Springfield, IL
- Senior Frontend Developer (React/Angular, Component Library, AI Agent)PTR Global · Full time · Austin, TX
- Full Stack Java/Go Developer (Bilingual English/Spanish)Dev Technology · Full time · Arlington, VA
Commenters (This Week)
Themis Angelopoulos
1 comment
Kouki Badr
1 comment
LegendsDaD
1 comment
Contribute meaningful comments to climb the leaderboard and earn badges!