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

Add a dropdownFilter change callback #262

Closed
kylrynr opened this Issue Nov 29, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@kylrynr

kylrynr commented Nov 29, 2016

Hi,

I have been trying to figure this out. Trying to find out if there is a way to change the placeholder text based on what is selected on the list? (For Example: "Search" is change to "Ale" when Ale is selected from the dropdown list) I have been looking for this on the documentation.

@running-coder

This comment has been minimized.

Owner

running-coder commented Nov 29, 2016

hey, there is currently no event that listens for the dropdownFilter change. That could be a good feature to implement giving the number of results and perhaps other data in the callback params.

meanwhile you can implement it on your own with something like:

$(document).on('click', '.typeahead__dropdown-item', function (e) {
    // Get value of the dropdown item that was clicked
    // Update Typeahead's input placeholder
})
@kylrynr

This comment has been minimized.

kylrynr commented Nov 29, 2016

Thank you.

I will use that.

@running-coder running-coder changed the title from Placeholder text to Add a dropdownFilter change callback Nov 29, 2016

@running-coder running-coder added this to the 2.8.0 milestone Dec 6, 2016

@running-coder

This comment has been minimized.

Owner

running-coder commented Dec 6, 2016

Added in the develop branch

running-coder added a commit that referenced this issue Mar 1, 2017

Version 2.8.0

Features

- #302 `cache`, `compression` and `ttl` can now be configured at group level
- #299, #304 Add `templateValue` option
- #280 Default suggestions, added suggestion_v1 demo
- #275 Dynamic sources, each groups can now be configured to be `dynamic: true`
- #284 Added option `blurOnTab` to blur Typeahead when "Tab" key is pressed
- #262 Add `onDropdownFilter` callback
- Add `maxLength` option

Fixes

- #297 Duplicated entries in dropdown filters
- #286 Using dynamic, groupOrder and groupTemplate options, the results are empty after the second search
- #285 "undefined" is appearing in the template when a key is not defined instead of empty string
- #283 issue when Ajax `path` config is left blank
- #281 multi level deep data inside the source objects
- #274 onCancel event
- #270 Hide autocomplete suggestions when text input loses focus

running-coder added a commit that referenced this issue Mar 1, 2017

Version 2.8.0
Features
- #302 `cache`, `compression` and `ttl` can now be configured at group level
- #299, #304 Add `templateValue` option
- #280 Default suggestions, added suggestion_v1 demo
- #275 Dynamic sources, each groups can now be configured to be `dynamic: true`
- #284 Added option `blurOnTab` to blur Typeahead when "Tab" key is pressed
- #262 Add `onDropdownFilter` callback
- Add `maxLength` option

Fixes
- #297 Duplicated entries in dropdown filters
- #286 Using dynamic, groupOrder and groupTemplate options, the results are empty after the second search
- #285 "undefined" is appearing in the template when a key is not defined instead of empty string
- #283 issue when Ajax `path` config is left blank
- #281 multi level deep data inside the source objects
- #274 onCancel event
- #270 Hide autocomplete suggestions when text input loses focus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment