Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9969 closed bug (duplicate)

ui.autocomplete unaccommodated a clear method expressly.

Reported by: Chiether Owned by:
Priority: minor Milestone: none
Component: ui.autocomplete Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:

Description

I want to be accommodated and need provide clear method.

_searchTimeout says only search if the value has changed in comment.

but remain in this.term when change with script, or without key-down.

sample: http://jsfiddle.net/TF3YZ/1/

Change History (6)

comment:1 Changed 9 years ago by Chiether

yes, we can clear that use this code.

$("#autocomplete").val('');
$("#autocomplete").autocomplete('search', '');

but 'search' methods be hardly a satisfactory settlement. Because it won't search and wasteful load and response. I think this one.

$("#autocomplete").autocomplete('clear');
Version 0, edited 9 years ago by Chiether (next)

comment:2 Changed 9 years ago by Chiether

yes, we can clear that use this code.

$("#autocomplete").val("");
$("#autocomplete").autocomplete("search", "");

but search methods be hardly a satisfactory settlement. Because it won't search and wasteful load and response.

I preferred this one.

$("#autocomplete").autocomplete("clear");

comment:3 Changed 9 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #7434.

comment:4 Changed 9 years ago by Chiether

Replying to scott.gonzalez:

Scott, thanks find kinda looks a like ticket. But I can't go along with #7434.

7434 says 'Selected Text Trigger Usability' and 'trigger _search when get focus back.' but this is 'Implement clear method', NOT TRIGGER.

By the way... I try patched 7434 but its unresolved.

  1. focus-in -> show all
  2. input text-box a letter 'a' -> show filtered
  3. focus-out and press clear button -> clear text-box
  4. focus-in -> show all
  5. input text-box a letter 'a' -> show all (NOT FILTERED!)

Okay, I try coding and make pull request(but maybe it a little later, because busy work).

and, This is positive continue and change to #7434 ?

Last edited 9 years ago by Chiether (previous) (diff)

comment:5 Changed 9 years ago by Scott González

You don't actually care about a clear method. You care that the autocomplete searches when it should. If you insist these are separate issues, I can reclose as won't fix, because we won't add a clear method.

comment:6 in reply to:  5 Changed 9 years ago by Chiether

Replying to scott.gonzalez:

You don't actually care about a clear method. You care that the autocomplete searches when it should.

I don't feel a need reopen and see what make no case for redundantly searches, considering its a low frequency of operation.

Scott, thanks your replying. *waves*

Last edited 9 years ago by Chiether (previous) (diff)
Note: See TracTickets for help on using tickets.