Skip to content
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

Added search in selectBox dropdown with scroll #186

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cbernat
Copy link

@cbernat cbernat commented Oct 20, 2017

Added an input to allow type search, in selectbox dropdown with scroll.
Added a resize list function for dropdowns displayed on top of select.
Added input event to capture typed text.
Removed Keypress event for dropdowns.
Removed keydown for backspace, to allow delete chars in search input.

@cbernat
Copy link
Author

cbernat commented Oct 20, 2017

I had to do this modificationi for my project, and I thought it maybe useful to someone. @marcj

@andresmoschini
Copy link

Hey @cbernat! I had issues with the autocomplete and I found it, it will be very helpful, thanks!

}
this.typeSearch = control.find('.selectBox-input').val();
options.find('A').each(function () {
if ($(this).text().substr(0, self.typeSearch.length).toLowerCase() === self.typeSearch.toLowerCase()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In our current implementation, I had to patch this in this way:

Suggested change
if ($(this).text().substr(0, self.typeSearch.length).toLowerCase() === self.typeSearch.toLowerCase()) {
if ($(this).text().trim().substr(0, self.typeSearch.length).toLowerCase() === self.typeSearch.toLowerCase()) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants