how to change popup size when use filter in combobox

2 posts, 0 answers
  1. dieshangtianya
    dieshangtianya avatar
    1 posts
    Member since:
    Jul 2015

    Posted 29 Jul 2015 Link to this post

    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{
    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.    };


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

  2. Georgi Krustev
    Georgi Krustev avatar
    3725 posts

    Posted 31 Jul 2015 Link to this post

    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.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top