Select2 initialize duplicate component
Hi,
I've updated my project from 2.1.1 to 3.0.6.
I use select2 component as below
@Html.DropDownListFor(model => model.FirmId, new SelectList((System.Collections.IEnumerable)ViewBag.firmList, "Value", "Text"),
new { @id = "FirmSelect", @class = "form-select form-select-sm form-select-solid", @data_control = "select2", @style = "width:250px;", @onchange = "SelectFirm()", @required = "required" })
This creates 2 diffrent select2 component. One of them regular and works perfect. The other is duplicate and has no options and only a placeholder shown as "Select".
Why does it duplicates component.
I've updated my project according to Update Guidlines at https://preview.keenthemes.com/html/keen/docs/getting-started/updates
I have one more project that updated from 3.0.5 to 3.0.6 which works great.
Replies (3)
Yep, you've got the point.
I was looking for the second code that initializes... Finally found it. Thanks.
Hi
,
Great! if you need any further help please do let us know.
All the best with your project!
Regards.
Your Support Matters!
Hi,
Could you please provide us with your test link? Probably you have 2 codes that initializes select2 twice. Please double check your code and make sure you remove Keen v2-related code that initializes Select2.
Regards.