New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overriding matcher #111

Closed
kkurt opened this Issue Nov 15, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@kkurt

kkurt commented Nov 15, 2015

Hi;
Please add "matcher" property for geting all data from server or using own matcher algorithm.

@running-coder running-coder added this to the 2.3.0 milestone Dec 11, 2015

running-coder pushed a commit that referenced this issue Dec 14, 2015

tom bertrand
#111, #126 Added ``options.filter`` and ``options.matcher`` to overri…
…de or extend Typeahead filtering methods

Filter: set to false or function (item, displayKey)to bypass Typeahead filtering. WARNING: accent, correlativeTemplate, offset & matcher will not be interpreted

Matcher: add an extra filtering function (item, displayKey) after the typeahead functions

return undefined to skip to next item
return false to attempt the matching function on the next displayKey
return true to add the item to the result list
return item object to modify the item and add it to the result list
@running-coder

This comment has been minimized.

Owner

running-coder commented Dec 14, 2015

hey kkurt, the feature is available in the develop branch until 2.3.0 is released

thanks

running-coder added a commit that referenced this issue Dec 24, 2015

Version 2.3.0
Features

- Added option ``backdropOnFocus`` will trigger the backdrop option as long as the Typeahead input is focused
- Added ``onShowLayout`` and ``onHideLayout`` callbacks
- ``template`` can now be a function (query, item) that returns a template string
- Added query string sanitization
- Added ``.typeahead-item`` and ``.typeahead-empty`` on list items to easily apply CSS on these LI elements
- #109 ``correlativeTemplate`` can be an array of display keys instead of the complete template
- #111, #127 Added ``filter`` and ``matcher`` options. See the documentation to know the differences and possible return options.
- #115 Added ``e.preventInputChange`` boolean to ``onNavigateBefore`` callback to prevent the input from changing when navigating (arrow up / down) the results
- #118 Every functions and callbacks are now scoped with the Typeahead object, it is possible to use ``this`` to reach the Typeahead variables & functions
- #122 It is now possible to set a custom accent object with ``from`` and ``to``
- #125 Added ``onNavigateAfter`` callback
- #127 ``emptyTemplate`` now accepts a jQuery LI object
- #132 It is now possible to set a function that returns a request object inside ``source.group.url``

Fixes

- Removed ``.show()`` and ``.hide()`` jQuery functions, use the CSS instead!
- Fixed dropdownFilter when clicking outside wouldn't close it
- Fixed jQuery-3.0.0-alpha1 issue, missing the node.selector so using ``options.input`` is now mandatory for using Typeahead['#my-search'] (see extras section in documentation)
- Fixed highlight option when query was empty
- #121 ``selector.hint`` was not being interpreted

running-coder added a commit that referenced this issue Dec 24, 2015

Version 2.3.0
Features

- Added option ``backdropOnFocus`` will trigger the backdrop option as long as the Typeahead input is focused
- Added ``onShowLayout`` and ``onHideLayout`` callbacks
- ``template`` can now be a function (query, item) that returns a template string
- Added query string sanitization
- Added ``.typeahead-item`` and ``.typeahead-empty`` on list items to easily apply CSS on these LI elements
- #109 ``correlativeTemplate`` can be an array of display keys instead of the complete template
- #111, #127 Added ``filter`` and ``matcher`` options. See the documentation to know the differences and possible return options.
- #115 Added ``e.preventInputChange`` boolean to ``onNavigateBefore`` callback to prevent the input from changing when navigating (arrow up / down) the results
- #118 Every functions and callbacks are now scoped with the Typeahead object, it is possible to use ``this`` to reach the Typeahead variables & functions
- #122 It is now possible to set a custom accent object with ``from`` and ``to``
- #125 Added ``onNavigateAfter`` callback
- #127 ``emptyTemplate`` now accepts a jQuery LI object
- #132 It is now possible to set a function that returns a request object inside ``source.group.url``

Fixes

- Removed ``.show()`` and ``.hide()`` jQuery functions, use the CSS instead!
- Fixed dropdownFilter when clicking outside wouldn't close it
- Fixed jQuery-3.0.0-alpha1 issue, missing the node.selector so using ``options.input`` is now mandatory for using Typeahead['#my-search'] (see extras section in documentation)
- Fixed highlight option when query was empty
- #121 ``selector.hint`` was not being interpreted

running-coder added a commit that referenced this issue Dec 24, 2015

Version 2.3.0
Features

- Added option ``backdropOnFocus`` will trigger the backdrop option as long as the Typeahead input is focused
- Added ``onShowLayout`` and ``onHideLayout`` callbacks
- ``template`` can now be a function (query, item) that returns a template string
- Added query string sanitization
- Added ``.typeahead-item`` and ``.typeahead-empty`` on list items to easily apply CSS on these LI elements
- #109 ``correlativeTemplate`` can be an array of display keys instead of the complete template
- #111, #127 Added ``filter`` and ``matcher`` options. See the documentation to know the differences and possible return options.
- #115 Added ``e.preventInputChange`` boolean to ``onNavigateBefore`` callback to prevent the input from changing when navigating (arrow up / down) the results
- #118 Every functions and callbacks are now scoped with the Typeahead object, it is possible to use ``this`` to reach the Typeahead variables & functions
- #122 It is now possible to set a custom accent object with ``from`` and ``to``
- #125 Added ``onNavigateAfter`` callback
- #127 ``emptyTemplate`` now accepts a jQuery LI object
- #132 It is now possible to set a function that returns a request object inside ``source.group.url``

Fixes

- Removed ``.show()`` and ``.hide()`` jQuery functions, use the CSS instead!
- Fixed dropdownFilter when clicking outside wouldn't close it
- Fixed jQuery-3.0.0-alpha1 issue, missing the node.selector so using ``options.input`` is now mandatory for using Typeahead['#my-search'] (see extras section in documentation)
- Fixed highlight option when query was empty
- #121 ``selector.hint`` was not being interpreted

running-coder added a commit that referenced this issue Dec 26, 2015

Version 2.3.0
Features

- Added option ``backdropOnFocus`` will trigger the backdrop option as long as the Typeahead input is focused
- Added ``onShowLayout`` and ``onHideLayout`` callbacks
- ``template`` can now be a function (query, item) that returns a template string
- Added query string sanitization
- Added ``.typeahead-item`` and ``.typeahead-empty`` on list items to easily apply CSS on these LI elements
- Added a resetLayout function
- #109 ``correlativeTemplate`` can be an array of display keys instead of the complete template
- #111, #127 Added ``filter`` and ``matcher`` options. See the documentation to know the differences and possible return options.
- #115 Added ``e.preventInputChange`` boolean to ``onNavigateBefore`` callback to prevent the input from changing when navigating (arrow up / down) the results
- #118 Every functions and callbacks are now scoped with the Typeahead object, it is possible to use ``this`` to reach the Typeahead variables & functions
- #122 It is now possible to set a custom accent object with ``from`` and ``to``
- #125 Added ``onNavigateAfter`` callback
- #127 ``emptyTemplate`` now accepts a jQuery LI object
- #132 It is now possible to set a function that returns a request object inside ``source.group.url``

Fixes

- Removed ``.show()`` and ``.hide()`` jQuery functions, use the CSS instead!
- Fixed dropdownFilter when clicking outside wouldn't close it
- Fixed jQuery-3.0.0-alpha1 issue, missing the node.selector so using ``options.input`` is now mandatory for using Typeahead['#my-search'] (see extras section in documentation)
- Fixed highlight option when query was empty
- Fixed href option where clicking the "a" link wouldn't redirect
- Fixed group search
- #121 ``selector.hint`` was not being interpreted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment