Completed
Last Updated: 11 Jan 2021 15:02 by ADMIN
CHRISTOPHER
Created on: 06 Mar 2015 16:02
Category: AutoComplete
Type: Feature Request
30
Extend Autocomplete with a customizable option to not trigger when MinLength is set and the Textbox becomes empty
In order to fix concerns from #241 (https://github.com/telerik/kendo-ui-core/issues/241) the Autocomplete now shows a full list of items when the text entered has been deleted.  This ignores the MinLength option, and can cause unresponsiveness in the browser (since MinLength is generally there to reduce the amount of results).  From #574 this new functionality is intentional (and as such, the thread was closed as won't fix), but in practical terms, this causes issues for a lot of people.  If you really don't want to enforce MinLength when 0 results are returned, perhaps adding an extraoption like 'AlwaysEnforceMinLength' would solve this problem
6 comments
ADMIN
Alex Hajigeorgieva
Posted on: 11 Jan 2021 15:02

Hello, Tony,

It appears to work well with the current version when enforceMinLength is set to true and the minLength is 1:

https://dojo.telerik.com/oBOHacIt

Please let us know what steps to take to reproduce the erroneous behaviour.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tony
Posted on: 13 Jan 2018 07:35
this still isn't working properly - I see the "enforceMinLength" property - but this doesn't work when minLength is "1".  

Worked fine in the "2015.2.805" -- what happened??????
Thiago
Posted on: 08 Dec 2017 17:39
Does not make sense it do not respect the MinLength when clear data, if MinLength is 2 then it it should only display anything if it as at least two characters 
Simon
Posted on: 30 Jan 2016 21:18
No way this should be the default behaviour, it is WRONG. I've just discovered this and to me it's a plain bug. I'm using this against recordsets containing 1000's of rows, so it will kill performance unless I code around it. Telerik, please amend it. I'm fine if it's a flag as suggested, but default should be triggerOnEmptyText = false. Thanks.
Imported User
Posted on: 04 Aug 2015 16:45
I'm agree, when the textbox is empty no information must be retrieved. I think this could be optional with the proposed triggerOnEmptyText flag.
gsharp
Posted on: 09 Jun 2015 09:53
If the .MinLength is set to a specific value, the read action is called by the Autocomplete box as soon as the Autocomplete Textbox becomes empty.

This behaviour is not always desired, therefore I suggest to extend the MinLength method with an optional parameter to support both behaviours.

Like
.MinLength(int length, bool triggerOnEmptyText = true)