Setting value breaking controls

I recently updated my project to latest rev of Blazor components.  After doing so, I can no longer set the value of a dropdown list from within code.  If I don't assign a value, either through the "Value" property or the "bind-Value" property, the dropdown list populates and I am able to select a value from the list.  If I set the value from code, the dropdown list does not drop down, and none of my other data components render data.  Assigning a value through code essentially breaks all controls without rendering any data.  If I don't set the value, everything renders properly.  Any help or insight into this would be greatly appreciated.

Thank you,
Binu Agrawal

2 Replies

SP Sureshkumar P Syncfusion Team May 13, 2020 07:19 AM UTC

Hi Binu, 
 
Greetings from Syncfusion support.  
 
Based on your shared information we suspect that you have loaded our Syncfusion package version as 18.1.0.46 in your application. This is known issue in this version, and we have already resolved this issue in our latest 18.1.0.48 version. We suggest you upgrade the latest version to resolve the issue.  
 
Kindly refer the code example. 
<SfDropDownList TItem="GameFields" TValue="string" PopupHeight="230px" Placeholder="Select a game" @bind-Value="@DropVal" DataSource="@Games"> 
    <DropDownListFieldSettings Text="Text" Value="ID"></DropDownListFieldSettings> 
</SfDropDownList> 
@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"}, 
     }; 
    public string DropVal { get; set; } = "Game4"; 
} 
 
 
 
 
We have created the sample based on your requirement. please find the sample here: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DDL2072322127  
 
Regards, 
Sureshkumar P 



PG Pon Geetha A J Syncfusion Team May 14, 2020 04:25 AM UTC

From: Binu Agrawal 
Sent: Wednesday, May 13, 2020 10:56 AM
To: Syncfusion Support <[email protected]>
Subject: RE: Syncfusion support community forum 154201, Setting value breaking controls, has been updated. 

Thank you.  That resolved the issue. 


Loader.
Up arrow icon