Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Hi Syncfusion
I'm having a bit of trouble using the sfMultiSelect control for entering integer values.
I want to use it to allow a user to enter one or more values ("My lucky numbers") without using a picklist.
I have done the same with string values ("My tags") and that works as expected - but I can't make it work for integers and thus I have some questions and observations:
1) I can't make it display initial values using .Value in "My lucky numbers" - the control is empty. Why is that?
2) Is it possible to specify an input mask so the user can only enter digits?
3) When I remove a single value it seems the ValueChanged event is called twice? Is that intended?
4) If I click the "remove all" x-icon then my browser hangs
5) And lastly: is there a more suited control that I could use instead of sfMultiSelect?
Thanks in advance.
Thomas
@page "/multiselectctrl1" @using Syncfusion.Blazor.DropDowns @using Syncfusion.Blazor.Inputs < h1>Fun with SfMultiSelect< /h1>
Messages:
@code { private string[] MyTags { get; set; } = new[] { "hello", "there" }; private int[] MyLuckyNumbers { get; set; } = new[] { 3, 12, 42 }; private string[] EmptyStrings { get; set; } = new string[] { }; private List
@((MarkupString)string.Join("
", Messages))Messages { get; set; } = new List (); public void TagsChanged(string[] args) { MyTags = args; Messages.Add($"{DateTime.Now} Tags changed to: " + string.Join(",", args)); } public void LuckyNumbersChanged(int[] args) { MyLuckyNumbers = args; Messages.Add($"{DateTime.Now} Numbers changed to: " + string.Join(",", args)); } }