ComboBox Rebind/Filter on Text Deleted

3 posts, 1 answers
  1. webHDSB
    webHDSB avatar
    2 posts
    Member since:
    Apr 2011

    Posted 12 Dec 2014 Link to this post

    When using the minLength configuration setting, a ComboBox initially respects the minLength and does not bind or filter data (dataBound & filtering event handlers not called) until the minLength is reached by the combo's text.

    However, when deleting text from the input, the minLength works until all the text is deleted. At that point (there is no longer any text in the input), the event handlers for dataBound & filtering are called even though the length is 0 (ie. not at minLength).

    Is this a bug or is there a way for the minLength to continue to work when all text has been removed? This behaviour can be seen using an example from the Dojo: http://dojo.telerik.com/aPEba

    This becomes more problematic when the data that is bound is much larger, hence the use of the minLength configuration for search.
  2. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 16 Dec 2014 Link to this post

    Hello,

    The described behavior is intended, as we've got many bug reports that widget will not clear filter when "minLength" is defined and thus the widget behaves unexpected for the end user. You can overcome this behavior preventing the filtering of the widget. Wire the filtering event and call "e.preventDefault()" when filter value is empty. Check the updated demo.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. webHDSB
    webHDSB avatar
    2 posts
    Member since:
    Apr 2011

    Posted 17 Dec 2014 in reply to Georgi Krustev Link to this post

    Perfect, thanks Georgi.
Back to Top