We've recently undertaken an upgrade from Kendo UI 2013.2.716 to 2016.3.1118 and we've noticed some issues for our drop down lists. Some of our scenarios call for drop down lists with empty ("[]") data sources until other operations cause them to be filled, or they remain hidden.
Upon changing versions we've noticed that upon the initWidget method being called for that drop down list, the data source is being parsed as a string ("[]") when previously it was being recognised as an empty array. Some investigation and comparison of the two versions led me to a particular regular expression that had changed between the versions in parseOption:
2013 - jsonFormatRegExp = /^\{(\d+)(:[^\}]+)?\}/
2016 - jsonFormatRegExp = /^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/
In 2013 this was not matching the empty array "[]", causing the code path to return it from a function (well, an "evil") to the initWidget method - now that it's matching, however, it's passing the string value back which is causing errors later in the code with the [] being used in getter names. Is there another way we should be populating this field? How can we get this version to recognise this value as the empty array it was intended to be?
<input class=" roadmap" data-option-label="Select" data-role="dropdownlist" data-source="[]" data-text-field="Text" data-value-field="Value" id="xxx" name="yyy" style="width:100%;" type="text" value="" />