The DropDownList Model failed to work after upgraded to 18.2.0.44

Hi team,

When the In-Place Editor with DropDownList type works fine with model structure like this before v18.2:

            <SfInPlaceEditor Name="@nameof(Student.Country)" Mode="RenderMode.Inline" Type="InputType.DropDownList" @bind-Value="Student.Country" Model="CountryModel" ShowButtons="false" EmptyText="">
                <InPlaceEditorEvents OnActionBegin="OnActionBegin" TValue="string"></InPlaceEditorEvents>
            </SfInPlaceEditor>

        public SfDropDownList<string, string> CountryModel { get; } = new SfDropDownList<string, string>()
        {
            Placeholder = TaurusLocale.Country,
            DataSource = Enum.GetNames(typeof(Country)),
            AllowFiltering = true,
            ShowClearButton = false
        };

it dosen't works any more after the upgrade, I found that I have to change the model type to "object" to make it work again, like this:

        public object CountryModel { get; } = new 
        {
            placeholder = TaurusLocale.Country,
            dataSource = Enum.GetNames(typeof(Country)),
            allowFiltering = true,
            showClearButton = false
        };

If the former model is indeed invalid, which I have made a lot of discussion and got some kind of confirmation of model usage here in the forum with you, that means I have to change all my interfaces and model types in my project now. It will be really frustrating about that since I see In-Place Editor is no longer in preview status. I am sorry it sounds like a complain but the huge change without stable API really annoys me so much.

Could you please reconfirm if obsolete of using SfDropDownList as model type is the fact. and should I make effort to amend my code to follow the change..

Thanks.

11 Replies 1 reply marked as answer

BR Brian July 9, 2020 09:03 AM UTC

I also find that other models like DatePickerModel face the same problem too. And, in an object model used for InputType.Date, the showClearButton = false property dosen't work (which works in object model InputType.DropDownList):

        public object DateModel { get; } = new
        {
            showClearButton = false
        };

the Editor still shows the ClearButton when active.


IS Indrajith Srinivasan Syncfusion Team July 10, 2020 04:07 PM UTC

Hi Brian,

Sorry for the inconvenience caused,
 
 
We have validated your reported query and able to reproduce the reported issue from our end. As a workaround, we suggest you to define you the Model like below for the DropDownList. We will also include the existing working behavior with Inplace-editor Model binding within our next weekly patch release scheduled on 14th July. Until then you can use the below way for binding the Model.  
 
 
 
@using Syncfusion.Blazor  
@using Syncfusion.Blazor.Inputs  
@using Syncfusion.Blazor.DropDowns  
@using Syncfusion.Blazor.InPlaceEditor  
@using Newtonsoft.Json  


  
<SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.DropDownList" Value="@DropValue" Model="@DropModel">  
</SfInPlaceEditor>  

@code
 { 
 public DropDownModal DropModel = new DropDownModal()  
    {  
  
        Placeholder = "Select frameworks",  
        DataSource = new string[] { "Android""JavaScript""jQuery""TypeScript""Angular""React""Vue""Ionic" }  
    };  
    public class DropDownModal : SfDropDownList<stringstring>  
    {  
        [JsonProperty("dataSource")]  
        public object DataSource { getset; }  
        [JsonProperty("placeHolder")]  
        public string Placeholder { getset; }  
    } 
} 
 
 
We have validated on the reported query and have considered “Disable the showCloseIcon for the DateModel doesn't work” as a bug from our end and logged the report for the same, and the fix will be included with our weekly patch release, which is scheduled on 21st of July. 

You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link: https://www.syncfusion.com/feedback/15976/
 
  
Regards,  
Indrajith 


Marked as answer

IS Indrajith Srinivasan Syncfusion Team July 15, 2020 12:42 PM UTC

Hi Brian,

 
Thanks for your patience, 

We have resolved the issues with Inplace-editor Model bindings and the fix is now available with the Nuget package version 18.2.45. Below is the list of code blocks for Inplace-editor. We will also include the same in our documentation.
 

Changes done:
 
 
Model 
Before  
After 
DropDownList 
public SfDropDownList<string, string> DropModel = new SfDropDownList<string, string>() 
    { 
        Placeholder = "Android", 
        DataSource = new string[] { "Android", "JavaScript", "jQuery", "TypeScript", "Angular", "React", "Vue", "Ionic" } 
    }; 
public DropDownListModel<string> DropModel = new DropDownListModel<string>() 
    { 
        Placeholder = "Android", 
        DataSource = new string[] { "Android", "JavaScript", "jQuery", "TypeScript", "Angular", "React", "Vue", "Ionic" } 
    }; 
DateTime 
public TimePickerModel TimeModel = new TimePickerModel() 
    { 
        Placeholder = "Select date" 
    }; 
public TimePickerModel<string> TimeModel = new TimePickerModel<string>() 
    { 
        Placeholder = "Select date" 
    }; 
 
 
 
@using Syncfusion.Blazor.InPlaceEditor 
@using Syncfusion.Blazor.RichTextEditor 
 
<h3> Built-in Controls </h3> 
<table class="table-section"> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> DatePicker </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.Date" Value="@DateValue" Model="@DateModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> DateTimePicker </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.DateTime" Value="@DateTimeValue" Model="@DateTimeModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> DropDownList </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.DropDownList" Value="@DropValue" Model="@DropModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> MaskedTextBox </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.Mask" Value="@MaskValue" Model="@MaskedModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> NumericTextBox </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.Numeric" Value="@NumericValue" Model="@NumericModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> TextBox </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.Text" Value="@TextValue" SubmitOnEnter="true" Model="@TextModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
</table> 
<h3> Injectable Controls </h3> 
<table class="table-section"> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> AutoComplete </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.AutoComplete" Value="@AutocompValue" SubmitOnEnter="true" Model="@AutocompModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> ColorPicker </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
           <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.Color" Value="@ColorValue" SubmitOnEnter="true"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> ComboBox </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.ComboBox" Value="@ComboBoxValue" SubmitOnEnter="true" Model="@ComboBoxModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> DateRangePicker </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.DateRange" Value="@DateRangeValue" SubmitOnEnter="true" Model="@DateRangeModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> MultiSelect </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.MultiSelect" Value="@MultiValue" SubmitOnEnter="true" Model="@MultiModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> RTE </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.RTE" Value="@RteValue" SubmitOnEnter="true" Model="@RteModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> Slider </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.Slider" Value="@SliderValue" SubmitOnEnter="true"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
    <tr> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6 control-title"> TimePicker </td> 
        <td class="col-lg-6 col-md-6 col-sm-6 col-xs-6"> 
            <SfInPlaceEditor Mode="RenderMode.Inline" Type="InputType.Time" Value="@TimeValue" SubmitOnEnter="true" Model="@TimeModel"> 
            </SfInPlaceEditor> 
        </td> 
    </tr> 
</table> 
 
<style> 
 
    body { 
        padding: 20px 0 
    } 
 
    .control-title { 
        font-weight: 600; 
        padding-right: 20px; 
    } 
 
    .control-title { 
        width: 50%; 
    } 
 
    td { 
        height: 80px; 
    } 
 
    tr td:first-child { 
        text-align: right; 
    } 
 
    tr td:last-child { 
        text-align: left; 
    } 
 
    .table-section { 
        margin: 0 auto; 
    } 
 
    h3 { 
        text-align: center; 
    } 
</style> 
 
@code { 
    public DateTime DateValue { get; set; } = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); 
    public DateTime DateTimeValue { get; set; } = DateTime.Now; 
    public DateTime[] DateRangeValue { get; set; } = new DateTime[] { DateTime.Now, DateTime.Now.AddDays(20) }; 
    public DateTime TimeValue { get; set; } = DateTime.Now; 
 
    public string MaskValue = "123-345-678"; 
    public string NumericValue = "10"; 
    public string TextValue = "Andrew"; 
    public string DropValue = "Android"; 
    public string AutocompValue = "Android"; 
    public string ColorValue = "#81aefd"; 
    public string ComboBoxValue = "Android"; 
    public string[] MultiValue = new string[] { "Android" }; 
    public string RteValue = "<p>Enter your content here</p>"; 
    public double SliderValue = 20; 
 
    public DatePickerModel DateModel = new DatePickerModel() 
    { 
        Placeholder = "Select date" 
    }; 
    public DateTimePickerModel<DateTime> DateTimeModel = new DateTimePickerModel<DateTime>() 
    { 
        Placeholder = "Select date" 
    }; 
    public DropDownListModel<string> DropModel = new DropDownListModel<string>() 
    { 
        Placeholder = "Android", 
        DataSource = new string[] { "Android", "JavaScript", "jQuery", "TypeScript", "Angular", "React", "Vue", "Ionic" } 
    }; 
    public MaskedTextBoxModel MaskedModel = new MaskedTextBoxModel() 
    { 
        Mask = "000-000-000" 
    }; 
    public NumericTextBoxModel<string> NumericModel = new NumericTextBoxModel<string>() 
    { 
        Placeholder = "Enter number" 
    }; 
    public TextBoxModel TextModel = new TextBoxModel() 
    { 
        Placeholder = "Enter some text" 
    }; 
    public AutoCompleteModel<string> AutocompModel = new AutoCompleteModel<string>() 
    { 
        Placeholder = "Select frameworks", 
        DataSource = new string[] { "Android", "JavaScript", "jQuery", "TypeScript", "Angular", "React", "Vue", "Ionic" } 
    }; 
    public ComboBoxModel<string> ComboBoxModel = new ComboBoxModel<string>() 
    { 
        Placeholder = "Select frameworks", 
        DataSource = new string[] { "Android", "JavaScript", "jQuery", "TypeScript", "Angular", "React", "Vue", "Ionic" } 
    }; 
    public DateRangePickerModel DateRangeModel = new DateRangePickerModel() 
    { 
        Placeholder = "Select date" 
    }; 
    public MultiSelectModel<string> MultiModel = new MultiSelectModel<string>() 
    { 
        Placeholder = "Select frameworks", 
        DataSource = new string[] { "Android", "JavaScript", "jQuery", "TypeScript", "Angular", "React", "Vue", "Ionic" } 
    }; 
    public RichTextEditorModel RteModel = new RichTextEditorModel() 
    { 
        Placeholder = "Enter your content here" 
    }; 
    public TimePickerModel<string> TimeModel = new TimePickerModel<string>() 
    { 
        Placeholder = "Select date" 
    }; 
} 
 
Also, the reported issue “Disable the showCloseIcon for the DateModel doesn't work” is resolved with the Nuget package version 18.2.45, when using the DatePickerModel instead of object type. 
 
Can you upgrade your package to this version to resolve the issue from your end ? 
 
Regards, 
Indrajith 



BR Brian July 16, 2020 12:51 AM UTC

The improvement is brilliant. However, could you please tell me why dosen't NumericTextBoxModel has properties of "Min" and "Max"? How can I limit input range without them. And why dosen't DropDownListModel  has "Fields" property to set Text and Value? Components couldn't meet my design target without them.


IS Indrajith Srinivasan Syncfusion Team July 16, 2020 02:44 PM UTC

Hi Brian,

We deeply regret for the inconvenience caused,
 

We have included the missing properties with the Models, including the Fields property with DropDownListModel and Min and Max properties with NumericTextBoxModel, the fix will be included with our next patch release on 21st July. Until then, we suggest you to use the already suggested workaround.

Regards,
 
Indrajith 



BR Brian July 16, 2020 11:58 PM UTC

I am glad to get the release date.


PM Pandiyaraj Muniyandi Syncfusion Team July 21, 2020 12:26 PM UTC

 
Thanks for your patience,  
 
We have include the missing In-place Editor properties with Models and the fix is now available with the NuGet package version 18.2.46. 
 
Can you please upgrade your package to this version to resolve the issue from your end?  
 
Regards, 
Pandiyaraj 



BR Brian July 23, 2020 01:59 AM UTC

I have seen the update, but the DropDownListModel's new-added FieldSettingsModel still has console error bug. I supplied a project to show it. if you pick a item from the list, the console error will report as the screenshot shows. Is there something wrong with it? please re-check your release, thank you.

Attachment: SyncfusionBlazorDropDownModelIssue_43c22ec2.rar


IS Indrajith Srinivasan Syncfusion Team July 23, 2020 01:20 PM UTC

Hi Brian, 
 
Good day to you, 
 
We have validated your reported query. The DropDownListModel Tvalue is set as the DataSource class StringDto, hence the reported script error occurs. Set proper Tvalue to resolve the reported issue. 
 
 
   private DropDownListModel<int> Model = new DropDownListModel<int> 
    { 
     ... 
     ...         
   }; 
 
 
Please get back to us if you need any further assistance, 
 
Regards, 
Indrajith 



BR Brian July 24, 2020 06:59 AM UTC

That works, thank you.


IS Indrajith Srinivasan Syncfusion Team July 24, 2020 01:54 PM UTC

Hi Brian,

Welcome,

Please let us know if you need any further assistance,

Regards,
Indrajith

Loader.
Up arrow icon