Added search in selectBox dropdown with scroll#186
Open
cbernat wants to merge 2 commits intomarcj:masterfrom
Open
Added search in selectBox dropdown with scroll#186cbernat wants to merge 2 commits intomarcj:masterfrom
cbernat wants to merge 2 commits intomarcj:masterfrom
Conversation
Author
|
I had to do this modificationi for my project, and I thought it maybe useful to someone. @marcj |
fcoronelmakingsense
approved these changes
Oct 20, 2017
|
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()) { |
There was a problem hiding this comment.
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()) { |
Comment on lines
+2
to
+4
| .selectBox-dropdown2{ | ||
| min-width: 150px; | ||
| } |
There was a problem hiding this comment.
Suggested change
| .selectBox-dropdown2{ | |
| min-width: 150px; | |
| } | |
| .selectBox-dropdown2 { | |
| min-width: 150px; | |
| } |
🤣
Author
There was a problem hiding this comment.
This is a test of course, ignore it please 😓
This branch will never get merged at this point.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.