I am having a few issues when attempting to bind dropdownlist items on click rather than on init. I am using the AngularJS directives and notice that k-auto-bind="false" is not working as expected. For one, it is ignored unless I manually add a "null" option within the select. Without this option it will bind on init and seemingly ignore the autobind attribute. More importantly, even when adding the option when autobind=false is working, it will not bind the ng-model on init. It will only bind when clicked. Is there no way to bind the model object's value without binding the drop down values??? I can't see any valid use case where somebody would not want the model to bind until clicked:
<select class="kendo-form-control"
ng-model="ngModel"
data-kendo-drop-down-list
data-k-data-text-field="textField"
data-k-data-value-field="valueField"
data-k-data-source="datasource"
data-k-auto-bind="false">
<option value=null>Select an option...</option>
</select>
$scope.datasource = {
transport: {
read: {
url: myUrl,
type: 'GET',
dataType: 'json'
},
},
schema: {
data: function (data) {
var results = [];
if (data.instances) {
data.instances.forEach(function (instance) {
var newInstance = angular.copy(instance);
delete newInstance.properties;
for (var prop in instance.properties) {
newInstance[prop] = instance.properties[prop];
}
results.push(newInstance);
});
}
else {
results = data;
}
return results;
}
}
};
}
Thanks!
<select class="kendo-form-control"
ng-model="ngModel"
data-kendo-drop-down-list
data-k-data-text-field="textField"
data-k-data-value-field="valueField"
data-k-data-source="datasource"
data-k-auto-bind="false">
<option value=null>Select an option...</option>
</select>
$scope.datasource = {
transport: {
read: {
url: myUrl,
type: 'GET',
dataType: 'json'
},
},
schema: {
data: function (data) {
var results = [];
if (data.instances) {
data.instances.forEach(function (instance) {
var newInstance = angular.copy(instance);
delete newInstance.properties;
for (var prop in instance.properties) {
newInstance[prop] = instance.properties[prop];
}
results.push(newInstance);
});
}
else {
results = data;
}
return results;
}
}
};
}
Thanks!