This is a migrated thread and some comments may be shown as answers.

Strange optionLabel bug

2 Answers 108 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 16 Feb 2016, 10:07 PM

I'm fairly certain nobody will be able to help with this bug, but since we're all pretty much out of ideas about what could be causing this here, figured we'd give it a shot.

 We have four different environments here--Dev, Alpha, Beta, and Production.  The strange behavior in question is that the optionLabel's are not showing up in Alpha environment, but we cannot reproduce this in Dev--they work properly in Dev.  In Alpha, the select element has all the correct <option> tags included, including the optionLabel, but is missing the element that Kendo creates for the optionLabel in the DOM:

Dev kendoDropDownList config:

 __kendo_devtools_id: 29
_arrow: kendoJQuery.fn.init[1]
_busy: null
_cascadeTriggered: true
_errorHandler: ()
_events: Object
_focusInputHandler: ()
_focused: kendoJQuery.fn.init[1]
_initial: null
_initialIndex: null
_inputWrapper: kendoJQuery.fn.init[1]
_isSelect: true
_old: ""
_oldIndex: 0
_open: false
_presetValue: false
_prev: ""
_request: false
_requestEndHandler: ()
_requestStartHandler: ()
_text: anonymous(d /**/)
_value: anonymous(d /**/)
_word: ""
dataSource: kendo.data.DataSource.extend.init
element: kendoJQuery.fn.init[1]
list: kendoJQuery.fn.init[1]
listView: kendo.ui.DataBoundWidget.extend.init
ns: ".kendoDropDownList"
optionLabel: kendoJQuery.fn.init[1]
optionLabelTemplate: anonymous(data /**/)
options: Object
popup: Widget.extend.init
selectedIndex: 0
span: kendoJQuery.fn.init[1]
ul: kendoJQuery.fn.init[1]
valueTemplate: ()
wrapper: kendoJQuery.fn.init[1]
__proto__: base

 

Alpha kendoDropDownList config (Uses Kendo minified script):

__kendo_devtools_id: 1063
_arrow: I.fn.init[1]
_busy: null
_cascadeTriggered: true
_errorHandler: ()
_events: Object
_focusInputHandler: ()
_focused: I.fn.init[1]
_initial: null
_initialIndex: null
_inputWrapper: I.fn.init[1]
_isSelect: true
_old: "1967"
_oldIndex: 1
_open: false
_presetValue: false
_prev: ""
_prevent: true
_request: false
_requestEndHandler: ()
_requestStartHandler: ()
_text: anonymous(d /**/)
_value: anonymous(d /**/)
_word: ""
dataSource: i.data.DataSource.extend.init
element: I.fn.init[1]
list: I.fn.init[1]
listView: s.ui.DataBoundWidget.extend.init
ns: ".kendoDropDownList"
optionLabel: I.fn.init[0]
options: Object
popup: o.extend.init
selectedIndex: 1
span: I.fn.init[1]
typing: false
ul: I.fn.init[1]
valueTemplate: ()
wrapper: I.fn.init[1]
__proto__: i

 

As you can see, the optionLabel field outside of the options object, doesn't find the element it needs in Alpha, because it isn't there.  Both Dev/Alpha environments are on the 2016 release of Kendo; Production is on 2015, and the optionLabels are working correctly.  If anybody has any clues or inklings as to what would be causing this, it would be immensely helpful--thanks!

Here's the config for the kendoDropDownList:

$('#' + options.thisId).kendoDropDownList({
     value: options.selectedValue || "",
     dataSource: options.dataSource,
     dataTextField: options.dataTextField || "",
     dataValueField: options.dataValueField || "",
     valueTemplate: options.valueTemplate,
     template: options.template,
     optionLabel: options.optionLabel || "",
     change: _.bind(function () {
         filters = this.buildFilters(options.filterObjects);
         this.getKendoComponent().dataSource.filter(filters.filters,filters.additionalFilters);
     }, this)
});

2 Answers, 1 is accepted

Sort by
0
Ryan
Top achievements
Rank 1
answered on 17 Feb 2016, 05:44 PM
Update, I found the problem and will make a support ticket.  For some reason I didn't think of trying this yesterday, but I switched to the minified version of kendo.all.js, and can now reproduce the bug in our Dev environment--so the problem is in kendo.all.min.js.

I'll make a support ticket and document my findings as best I can
0
Ryan
Top achievements
Rank 1
answered on 17 Feb 2016, 06:12 PM
Nevermind, we actually screwed up our minified version when a Dev did a replace all on "optionLabel" at one point, and it accidentally hit kendo.all.min.js too.
Tags
DropDownList
Asked by
Ryan
Top achievements
Rank 1
Answers by
Ryan
Top achievements
Rank 1
Share this question
or