In a very special case it is impossible to select a value from the ComboBox. It only occurs on iPads.
if ComboBox filter is set, virtualization is on and the datasource is set programmatically after initialization. A data item cannot be selected from the list if it is filtered before hand and the item is located at the second page inside the popup.
Steps to reproduce:
- Open https://dojo.telerik.com/UbuRecut/4 on an iPad
- Wait till data source is set
- Input filter value (Popup should open and be scrollable)
- scroll to the end of the popup
- click element at the end of the list
- No item is selected
Used Dojo Snippet:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Kendo UI Snippet</title>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/themes/7.2.0/default/default-ocean-blue.css"/>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2024.1.130/js/kendo.all.min.js"></script>
</head>
<body>
<input id="orders" style="width: 400px" />
<script>
$(document).ready(function() {
const ctrl = $("#orders").kendoComboBox({
template: '<span class="order-id">#= OrderID #</span> #= ShipName #, #= ShipCountry #',
dataTextField: "ShipName",
dataValueField: "OrderID",
filter: 'startswith',
virtual: {
itemHeight: 26,
valueMapper: function(options) {
$.ajax({
url: "https://demos.telerik.com/kendo-ui/service/Orders/ValueMapper",
type: "GET",
dataType: "jsonp",
data: convertValues(options.value),
success: function (data) {
//the **data** is either index or array of indices.
//Example:
// 10258 -> 10 (index in the Orders collection)
// [10258, 10261] -> [10, 14] (indices in the Orders collection)
options.success(data);
}
})
}
},
height: 520,
}).data('kendoComboBox');
$.ajax({
url: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Orders",
type: "GET",
dataType: "json",
success: function (data) {
ctrl.setDataSource(data.d)
}
})
});
function convertValues(value) {
var data = {};
value = $.isArray(value) ? value : [value];
for (var idx = 0; idx < value.length; idx++) {
data["values[" + idx + "]"] = value[idx];
}
return data;
}
</script>
</body>
</html>