TAutocomplete use a TRepeater to render a suggestion list.
Following Scriptacoulous autocompleter docs:
"...If your search returns no results, it is critical that your server
immediately return an empty list, rather than nothing...."
The TAutocomplete createRepeater method doesn't set EmptyTemplate for TRepeater
and in case an empty list is rendered an empty response is sent back to the
autocompleter.
What steps will reproduce the problem?
1. Create an autocomplete code example.
2. Type a text that match some autocomplete results
3. Then add some chars not matching any suggestions
4. Suggestion panel will stay open with latest suggestions
What is the expected output? What do you see instead?
Suggestion panel will not disappear in case an empty list is returned because
TRepeater will not rendere header and footer in case an empty datasource is
passed.
We fixed this adding a
$repeater->setEmptyTemplate("<ul></ul>");
in createRepeater() method of TAutoComplete.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by drigo...@gmail.com on 7 Aug 2012 at 2:59
Original issue reported on code.google.com by
drigo...@gmail.com
on 7 Aug 2012 at 2:59