javascript - Angular Kendo Dropdownlist automatically adds blank option -
i using angular kendo , having strange issue kendo's dropdownlist control field bound first dropdown control on form has default ? undefined:undefined ?
in it. although generated html has selected="selected"
in first option. when explicitly select value in dropdown model updated properly.
the dropdown filled array in root scope.
also noticed if enable chrome's extension angularjs batarang works well.
i did debugging of angular-kendo , found out kendo automatically adding blank option has value of ? undefined:undefined ?.
<select class="s-select" kendo-drop-down-list k-data-source="lookupcache.getlookupvalues('gender')" k-data-text-field="'displayname'" k-data-value-field="'id'" k-value="'m'" ng-model="model.gender" />
where model {} default
for dynamic data source can use data-option-label
, follows:
<select name="packagename" id="packagename" kendo-drop-down-list k-options="dropdownlistoptions" k-ng-model="packageselected" ng-model="packagetypeid" data-option-label="{value:'select...',name:''}"/>
Comments
Post a Comment