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

how to change popup size when use filter in combobox

1 Answer 30 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
dieshangtianya
Top achievements
Rank 1
dieshangtianya asked on 29 Jul 2015, 11:09 AM

create a combobox and make the filter enabled. we type some text to filter the result, make sure we type key quickly and the result have no data items. then we click the drop down arrow, the popup area should become small but in fact it is always 200px.  Furthermore, after the combobox lost focus, we click the arrow, in filter event, the property e.filter is undefined.

01.var module = angular.module("mainApp", ["kendo.directives"]);
02.module.controller("MainCtrl", function ($scope) {
03.    $scope.stocksOption = {
04.        dataTextField: "Name",
05.        autoBind: false,
06.        dataSource: new kendo.data.DataSource({
07.            data: [
08.            { Name: "Apple" },
09.            { Name: "Orange" },
10.            { Name: "Pear" },
11.            { Name: "Grape" },
12.            { Name: "Banana" },
13.            { Name: "Watermelon" },
14.            { Name: "Muskmelon" },
15.            { Name: "Sugarcane" }
16.            ]
17.        }),
18.        filter: "contains"
19.    };
20. 
21.});

 

how to make the popup size become small when there are no data when filtered.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 31 Jul 2015, 08:58 AM
Hello dieshangtianya,

I tested the described behavior in our online Server Filtering demo, but could not observe the erroneous behavior. Probably I am missing something. Could you review this screencast and point in the correct repro steps?

With regards to the second issue, the filtering event will be raised only when the datasource is going to be filtered. This event will be raised even when the filter is cleared. If the widget is bound to list of primitive values, then the e.filter will not be an expression, because the data does not have properties. In this case, the e.filter will not be defined. What I would suggest you is first verify that e.filter is defined and then use it in the callback function.

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
ComboBox
Asked by
dieshangtianya
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or