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

object Object bug when null value

1 Answer 293 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 10 Sep 2015, 06:02 PM

The first time a value is chosen from my dropdownlist it will display "object Object". After selecting an item a second time, it correctly displays. I've tracked the offending line down to binder.js:

 isObservableObject = this._valueIsObservableObject

The first time through it is incorrectly (?) marked as an observable object so a complex object is set as the value. 

Demo: http://dojo.telerik.com/oreve

Changing POA for an item that is not null works. Changing POA for the empty line shows object Object.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 12 Sep 2015, 09:20 AM
Hello Ryan,

you will need to set the valuePrimitive option to true. Check the updated demo:
Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
DropDownList
Asked by
Ryan
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or