Issue with SfMultiSelect in latest release

I was using SfMultiSelect with no issue, but I updated to the latest 18.3.35 and now the MultisSelect doesn't work at all.  Not sure what version I was on before though.  I even tried your simple example and nothing binds to the dropdown list..

  <SfMultiSelect Mode="@VisualMode.Default" TValue="string[]" Placeholder="e.g. Australia" DataSource="@Country">
         <MultiSelectFieldSettings Value="Name"></MultiSelectFieldSettings>
  </SfMultiSelect>



    public string[] MultiVal { get; set; } = new string[] { };
    public class Countries
    {
        public string Name { get; set; }
        public string Code { get; set; }
    }

    public List<Countries> Country = new List<Countries>
{
        new Countries() { Name = "Australia", Code = "AU" },
        new Countries() { Name = "Bermuda", Code = "BM" },
        new Countries() { Name = "Canada", Code = "CA" },
        new Countries() { Name = "Cameroon", Code = "CM" },
    };


19 Replies

JM Jeyanth Muthu Pratheeban Sankara Subramanian Syncfusion Team October 6, 2020 07:48 AM UTC

Hi Michael, 

Thanks for contacting Syncfusion support.

We have checked your query of Multiselect not working. We have made sample with the provided code snippet and it is working good in our end with the latest version of 18.3.0.35. Here we have attached the ensured sample. Please let us know whether you are using WASM or server side application. Kindly check with the attached sample or if we misunderstood your query, kindly elaborate with some more additional information about the issue that will help us to validate the issue further and provide you a better solution from our end.

Sample Link       : https://www.syncfusion.com/downloads/support/forum/158417/ze/Multiselect170979357 
Screenshot:       :


 
 

Regards, 
Jeyanth. 



ML Michael Lambert October 7, 2020 03:01 AM UTC

When I cut and past the example into a new page in my project, I get this error.  Maybe something didn't get updated properly when I updated to 18.3.35?




JM Jeyanth Muthu Pratheeban Sankara Subramanian Syncfusion Team October 7, 2020 10:54 AM UTC

Hi Michael, 

Thanks for your update.

We suspect that this issue may occur due to resources were not loaded properly also due to NuGet cache since the same piece of code working in the provided project. So we suggest you to clear the NuGet by following the below link. If still issue persists, kindly revert with the below details.

1. Exact scenario of issue. 
2. Code snippet of the control rendering part and its associated callbacks. 
3. Project type (Server side or Web Assembly) 
4. If possible, reproduce the reported issue in the attached sample.

 

Kindly try out with the above solution and if issue still persists, provide the above mentioned details that will help us to validate the issue further and provide you a better solution from our end.

Thanks, 
Jeyanth. 



SA Sanjay October 9, 2020 01:38 AM UTC

I am getting this error too intermittently after updating. The SfMultiSelect is not working anymore. Images of code below

 
.


JM Jeyanth Muthu Pratheeban Sankara Subramanian Syncfusion Team October 9, 2020 11:22 AM UTC

Hi Sanjay, 

Thanks for your update.

We have validated your query of SfMultiselect not working and we have checked from our end based on the provided code snippet. Unfortunately, the reported issue is not reproduced at our end. Please find the sample and video demonstration below for your reference.  


Thanks, 
Jeyanth. 



BL Blazej October 9, 2020 05:40 PM UTC

I have similar problem,
After update SfMultiSelect stop working, but only when it is in SfGrid Template Dialog. When i place this outside template its working ok....

<SfGrid ID="Grid" @ref="Grid" DataSource="@_roles" AllowFiltering="true" AllowPaging="true" AllowTextWrap="true" Toolbar="@(new string[] {"Add","Edit","Delete","Search"})">
        <GridEvents OnActionComplete="ActionCompleteHandler" TValue="Data.Models.Roles"></GridEvents>
        <GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Excel"></GridFilterSettings>
        <GridPageSettings PageSize="10"></GridPageSettings>
        <GridEditSettings ShowDeleteConfirmDialog="true" AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="EditMode.Dialog" Dialog="DialogParams">
            <HeaderTemplate>
                @{
                    <span>@Title</span>
                }
            </HeaderTemplate>
            <Template>
                @{
                    var Role = (context as Data.Models.Roles);
                }
                <div>
                    <div class="form-row" style="clear:both !important;">
                        <div class="form-group col-xs-12 col-sm-12 col-lg-12 col-md-12">
                            <SfTextBox ID="Name" @bind-Value="@(Role.Name)" FloatLabelType="FloatLabelType.Always" Placeholder="@Localizer.GetText("Name")"></SfTextBox>
                        </div>
                    </div>
                    <div class="form-row" style="clear:both !important;">
                        <div class="form-group col-xs-12 col-sm-12 col-lg-12 col-md-12">
                            <SfTextBox ID="Description" @bind-Value="@(Role.Description)" FloatLabelType="FloatLabelType.Always" Placeholder="@Localizer.GetText("Description")"></SfTextBox>
                        </div>
                    </div>
                    <div class="form-row" style="clear:both !important;">
                        <div class="control-wrapper col-xs-12 col-sm-12 col-lg-12 col-md-12">
                            <SfMultiSelect @bind-value="@(Role.UsersID)" FloatLabelType="FloatLabelType.Always" Placeholder="@Localizer.GetText("Users")" @ref="EmployeeSelect" TValue="int[]" ModelType="@models" Mode="@VisualMode.Box" DataSource="@_employee">
                                <MultiSelectEvents TValue="int[]" Created="Created"></MultiSelectEvents>
                                <MultiSelectTemplates>
                                    <ItemTemplate Context="context_2">
                                        @((context_2 as MappedEmployee).Name) @((context_2 as MappedEmployee).Surname)
                                    </ItemTemplate>
                                    <ValueTemplate Context="context_2">
                                        @((context_2 as MappedEmployee).Name) @((context_2 as MappedEmployee).Surname)
                                    </ValueTemplate>
                                    <HeaderTemplate Context="context_2">
                                        @Localizer.GetText("FirstLastName")
                                    </HeaderTemplate>
                                </MultiSelectTemplates>
                                <MultiSelectFieldSettings Text="EmployeeID" Value="EmployeeID"></MultiSelectFieldSettings>

                            </SfMultiSelect>
                        </div>
                    </div>
                    <div class="form-row" style="clear:both !important;">
                        <div class="control-wrapper col-xs-12 col-sm-12 col-lg-12 col-md-12">
                            <SfMultiSelect @bind-value="@(Role.MenusID)" FloatLabelType="FloatLabelType.Always" Placeholder="@Localizer.GetText("Sites")" @ref="MenuSelect" TValue="int[]" ModelType="@menu_models" Mode="@VisualMode.Box" DataSource="@_menuitems">
                                <MultiSelectEvents TValue="int[]" Created="Created"></MultiSelectEvents>
                                <MultiSelectTemplates>
                                    <ItemTemplate Context="context_2">
                                        @((context_2 as MappedMenuItem).Text)
                                    </ItemTemplate>
                                    <ValueTemplate Context="context_2">
                                        @((context_2 as MappedMenuItem).Text)
                                    </ValueTemplate>
                                    <HeaderTemplate Context="context_2">
                                        @Localizer.GetText("Sites")
                                    </HeaderTemplate>
                                </MultiSelectTemplates>
                                <MultiSelectFieldSettings Text="MenuItemId" Value="MenuItemId"></MultiSelectFieldSettings>

                            </SfMultiSelect>
                        </div>
                    </div>
                </div>
            </Template>
        </GridEditSettings>
        <GridColumns>
            <GridColumn Field="RolesID" HeaderText="Order ID" Visible="false" TextAlign="TextAlign.Right" HeaderTextAlign="TextAlign.Center" IsPrimaryKey="true"></GridColumn>
            <GridColumn Field="Name" ValidationRules="@(new ValidationRules{ Required=true, Messages=message})" HeaderText="@Localizer.GetText("Name")" AutoFit="true" Visible="true" TextAlign="TextAlign.Center" HeaderTextAlign="TextAlign.Center"></GridColumn>
            <GridColumn Field="Description" HeaderText="@Localizer.GetText("Description")" Visible="true" TextAlign="TextAlign.Left" HeaderTextAlign="TextAlign.Center"></GridColumn>
            <GridColumn Field="UsersID" Visible="false"></GridColumn>
            <GridColumn Field="MenusID" Visible="false"></GridColumn>
            <GridColumn Field="Users" HeaderText="@Localizer.GetText("Users")" Visible="true" TextAlign="TextAlign.Left" HeaderTextAlign="TextAlign.Center"></GridColumn>
        </GridColumns>
    </SfGrid>


BL Blazej October 9, 2020 06:14 PM UTC

When i go back to version 18.2.0.59, its working good again in grid dialog template.


ML Michael Lambert October 11, 2020 12:30 AM UTC

So I created a new project with just your sample MultiSelect example.  That seems to work.  But if I add a new page to my current project and just add the same example code, it will work sometimes.  If I keep refreshing the page it will work one or two times, then I get the error, refresh again it goes away for a couple of refreshes then reappears.  Very sporadic.   I've clear nuget, de-installed syncfusion, reinstall syncfusion 18.3.35, then upgraded to 18.3.38 all with the same results.  Before upgrading to 18.3.35 everything worked fine.


ML Michael Lambert October 13, 2020 02:10 AM UTC

So after a little more investigation, two things. That 'cannot read property' error will go away if a refresh the page a couple of time, but is still very sporadic. Sometimes the page loads fine the first time, other times I have to refresh the page a few time... Another issue I notices was in the follow code (below), that if I use protected override async Task OnInitializedAsync, the multiSelect control does not bind to the list and I get 'no records' in the dropdown. If I just use the OnInitializedit works fine. Why would using Async/Await function have any bearing on this, especially when the database call has nothing to do with the control??
Also, I am using RenderMode.ServerPrerenderedbut I have the same results if I useRenderMode.Server also for the project.

Well actually your editor won't allow me to post all the code for some reason!!!!!!
You have tried to enter a word or URL that is not allowed on this site. If you believe that this is inaccurate, please contact us at [email protected].
Very frustrating!!!

But it is the same as your example, but with these to code sections, though not at the same time..

protected override void OnInitialized()
{
var x = db.Status.ToList();
}


//this causes the sfMultiSelect to not bind with the Games List
//protected override async Task OnInitializedAsync()
//{
//var x = await db.Status.ToListAsync();
//}
}


SL Steven Littleford October 13, 2020 08:29 AM UTC

I have t he same issue as well. Mine is not binding if the MultiSelect is on a Dialog.....

The thing that i find most frustrating is - THERE IS NOTHING IN THE DOCUMENTATION THAT YOU HAVE EVEN MADE A CHANGE TO THIS CONTROL!!!!!!

what is wrong with your processes that you cant even find a way to let us know that you have done some work in a control. At least then we can show some understanding that you may have broken something. 

it really is completely unacceptable. 




JM Jeyanth Muthu Pratheeban Sankara Subramanian Syncfusion Team October 13, 2020 02:05 PM UTC

Hi Everyone, 
 
We are sorry for the inconvenience caused and is regretted. 
 
We would like to thank you all for your patience and please find the details below for the reported issues.

Issue 1:
Console error  on rendering Multiselect

Solution:
 
We would like to let you know that, the static webassets will always be cached in the browser when we using Blazor WebAssembly application since the resources are loaded in the browser side for rendering.   
    
So, we suggest you to set the HTTP header with no-cache option in your server configuration to resolve this problem. Please refer to the below Github thread and ASP.NET forum for more details.   
    
    
Issue 2:

 
When placing Multiselect inside dialog, value not bound and showing No records found.

Solution:


We have resolved the reported issue in the version of 18.3.0.30. So we suggest you to upgrade the packages to resolve the issue. Please find the sample link below. 
 
 
Issue 3:

Value not bound to control, if using await call inside OnInitializedAsync().

Solution:


We have also resolved the reported issue in the version of 18.3.0.30. So we suggest you to upgrade the packages to resolve the issue from your end. Please find the sample link below. 
 
 
Kindly check the details and get back to us if you need any further assistance on this. 
 
Thanks, 
Jeyanth. 



ML Michael Lambert October 13, 2020 05:36 PM UTC

Actually nothing is still really working after upgrading to 18.3.40 (you mentioned 18.3.30, but there is none).  I've included a simple test project.  Use Page1 , if you use myList.Add("Game5") in OnInitialized, it works.  Even if you call the setGames() function from OnInitialized, it works.  BUT if you call the setGames from say a button click the MultiSelect does not update using myList.Add("Game5")???

Again all the code in my project regarding the Multiselect was working perfectly before upgrading to 18.3.x.

Mike

Attachment: TestMultiSelect_a75892b4.zip


SL Steven Littleford October 14, 2020 12:17 AM UTC

So what you are saying here is that not only did you not document the changes you made to this control but you also knew about the issues you had created when you did....

You know - i don't know about your other customers but i look forward to these quarterly updates like i look forward to going to the dentist. It is an extremely painful process and is not helped by the fact that you hide information from us. Instead we get  - sorry we cant reproduce - here is a sample that works can you please spend your valuable time (so we don't have to spend ours) reproducing the issue for us (even though we know what it is).

Yes, 18.3.40 now populates the multiselect dropdown in a dialog.


In addition selecting an item - while selecting the row doesn't turn on the check box checked styling until you leave the row. I had to add the following styling to override the standard bootstrap styling to get it to behave correctly - this was working fine in 18.2.59...





Cheers
Steve


JM Jeyanth Muthu Pratheeban Sankara Subramanian Syncfusion Team October 14, 2020 01:49 PM UTC

Hi Michael, 
 
Sorry for the inconvenience caused. 
 
We would like to thank you for helping us to understand your requirement much better. We have checked the attached project. On seeing the code snippet, you have used List<string> for value property. We would like to know you that we have already considered this case as improvement in our end. Therefore we suggest you to use type of value as string[] to resolve the issue. Please find the code snippet below.

 
@using System.Collections.ObjectModel 
<div class="control-section"> 
    <div class="control_wrapper"> 
        <div id='content'> 
            <div> 
                <h4> Default Mode</h4> 
                <SfMultiSelect TValue="string[]" @bind-Value="mylist" Mode="@VisualMode.Default" Placeholder="Favorite Sports" DataSource="@Games"> 
                    <MultiSelectFieldSettings Text="Text" Value="ID"></MultiSelectFieldSettings> 
                </SfMultiSelect> 
            </div> 
        </div> 
    </div> 
</div> 
<button type="button" @onclick="setGames">Set Games</button> 
 
@code{ 
 
    public class GameFields 
    { 
        public string ID { get; set; } 
        public string Text { get; set; } 
    } 
private List<GameFields> Games = new List<GameFields>() 
{ 
        new GameFields(){ ID"Game1"Text"American Football" }, 
        new GameFields(){ ID"Game2"Text"Badminton" }, 
        new GameFields(){ ID"Game3"Text"Basketball" }, 
        new GameFields(){ ID"Game4"Text"Cricket" }, 
        new GameFields(){ ID"Game5"Text"Football" }, 
        new GameFields(){ ID"Game6"Text"Golf" }, 
        new GameFields(){ ID"Game7"Text"Hockey" }, 
        new GameFields(){ ID"Game8"Text"Rugby"}, 
        new GameFields(){ ID"Game9"Text"Snooker" }, 
        new GameFields(){ ID"Game10"Text"Tennis"}, 
    }; 
 
    string[] mylist = new string[] { }; 
 
 
   
 
    private void setGames() 
    { 
 
        mylist = new string[] { "Game5""Game6" }; 
 
    } 
 
} 
 
 
Regards, 
Jeyanth. 



JM Jeyanth Muthu Pratheeban Sankara Subramanian Syncfusion Team October 14, 2020 01:50 PM UTC

Hi Steven, 
 
A support incident has been created under your Direct Trac account. Please log on to our support website to check for further updates  
  
Regards, 
Jeyanth. 



ML Michael Lambert October 18, 2020 11:38 PM UTC

Hi Jeyanth,
I don't think you understand or read through my issue properly.  Setting the property by using this: 
mylist = new string[] { "Game5""Game6" }; 

Might work fine for a quick example, but has absolutely no real world application.  I need to be able to have dynamic lists like:

mylist.Add("Game5"),  mylist.Remove("Game5"), etc!

Again this worked fine in 18.3.35, but looks like you broke it in 18.3.4x.
Mike


BC Berly Christopher Syncfusion Team October 19, 2020 01:31 PM UTC

Hi Michael, 
  
Thanks for you update. 
  
We have checked the reported issue. We would like to inform you that the reported issue occurs due to reference mismatch. In our source, we compared the current value and previous value and update the value accordingly. So whenever changing adding a value to the list, it will be reflected in another variable since it shared the same reference. So, we suggest you to update the value by cloning the variable as like below. 
  
           private void setGames() 
            { 
                var newValue = new List<string>(mylist); 
                newValue.Add("Game6");  //Does not work!!! 
                newValue.Add("Game5");  //Does not work!!! 
                mylist = newValue; 
 
            } 
  
Please find the below stack overflow links for your reference. 
  
Regards, 
Berly B.C 



ML Michael Lambert October 20, 2020 02:00 AM UTC

Berly,
Your solution has serious issues, and seems very 'hackish'.  What's the purpose of having databinding if I have to jump through those hoops!   It does select the values, but if you deleted the value in the dropdown and then and them back you'll now have duplicates of both 'Game5' and 'Game6', delete all four and add again, you now have triplicates of them.  Again this worked fine before upgrading to 18.3.40!! 

Mike


BC Berly Christopher Syncfusion Team October 20, 2020 12:20 PM UTC

Hi Michael, 
  
We deeply regret for the inconvenience caused. 
  
Before proceeding the reported issue, we need to confirm the reported issue belongs to the added value in the input or any other cases. We suspect that added value through external button click displayed multiple times in the MultiSelect input.  
  
We have taken video demonstration for suspicion of the reported issue from our end.  
  
If this is not an issue, please share the issue details clearly through any screenshot that will help us to check and proceed further at our end. 
  
Regards, 
Berly B.C 


Loader.
Up arrow icon