Bug Tracker

Modify

Ticket #3268 (closed feature: invalid)

Opened 5 years ago

Last modified 4 years ago

[autocomplete] added dropdown button support, setData function, "n results omitted" message support

Reported by: jkytomak Owned by:
Priority: minor Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: autocomplete Cc:
Blocking: Blocked by:

Description

I added some features to the autocomplete 1.0.2 component that were needed by my project. The features are:

"Dropdown button"

If option dropdownImgSrc is given, the image defined by it will be inserted next to the input field that, when clicked, will open the autocomplete result list with empty search params. Makes autocomplete more usable when the input might only hold few items but might hold many as well.

setData function

Function to reset the local data used by Autocomplete if it needs to be updated after initialization.

"N results omitted" message support

Autocomplete only shows options.max items on the result list, even if there are more results. This may be confusing in some cases, as there is no cues that some results are missing from the list. Added option omittedResultsMsg that, if defined and results > options.max, will be shown in the bottom of the autocomplete list. For example

omittedResultsMsg: "({0} results omitted - refine your search)"

will show message e.g. "(50 results omitted - refine your search)".

Attachments

autocomplete-mod.zip Download (26.5 KB) - added by jkytomak 5 years ago.

Change History

Changed 5 years ago by jkytomak

comment:1 Changed 5 years ago by jkytomak

Sorry, added this ticket twice by accident. Please remove #3267.

comment:2 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker,  http://dev.jqueryui.com .

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.