Skip to content

feat: add optional filter input to component:select#5943

Open
ahwayakchih wants to merge 8 commits intoDogfalo:v1-devfrom
ahwayakchih:filtered-select
Open

feat: add optional filter input to component:select#5943
ahwayakchih wants to merge 8 commits intoDogfalo:v1-devfrom
ahwayakchih:filtered-select

Conversation

@ahwayakchih
Copy link
Copy Markdown

Proposed changes

In case of long list of options in select field, it might be easier to quickly filter items by text. While current v1-dev branch does contain some filtering, it's not as helpful visually for users.

This change adds optional (available only when data-filtered="placeholder text" attribute is set on select element) input field, that allows user to see what he or she enters while trying to filter the list of items.
Additionally, items that do not match the text become hidden (class hide is added on li elements).

Changes were sponsored by Egmont Group.

Screenshots (if appropriate) or codepen:

screen

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist:

  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@charbelsako
Copy link
Copy Markdown

Hi, quick question do i actually have to make the feature i want to request?

@Dogfalo
Copy link
Copy Markdown
Owner

Dogfalo commented May 26, 2018 via email

@charbelsako
Copy link
Copy Markdown

Great. Can you add custom validation. Exactly like the validation class but
the user can supply an attribute data-regex to tell it when to succeed and fail.

@Dogfalo
Copy link
Copy Markdown
Owner

Dogfalo commented May 26, 2018 via email

@charbelsako
Copy link
Copy Markdown

Just did. #5945

@ahwayakchih
Copy link
Copy Markdown
Author

@Dogfalo hi, now that totally off topic stuff has been resolved, is there any chance for a comment about the pull request :)? Does it need more changes in code to be accepted, or maybe it won't be accepted because it adds too big of a change, or complicates component a bit, or... ?

@Dogfalo
Copy link
Copy Markdown
Owner

Dogfalo commented May 28, 2018

We're not adding any more features right now since we're in release candidate build

@ahwayakchih
Copy link
Copy Markdown
Author

@Dogfalo thanks for the answer. Do you think this feature could be merged post-1.0 release?

@Dogfalo
Copy link
Copy Markdown
Owner

Dogfalo commented May 28, 2018

Yes, it seems useful and code is organized

@ahwayakchih
Copy link
Copy Markdown
Author

Great! Thanks.

@ahwayakchih
Copy link
Copy Markdown
Author

@Dogfalo i updated to latest dev branch and fixed test. Any chance it could be merged now?

@ahwayakchih
Copy link
Copy Markdown
Author

@Dogfalo @acburst any chance this could be merged? If not, i can just close this and stop wasting your time :).

@Smankusors
Copy link
Copy Markdown

Hmm if you want, you can send your pull request to the forked one instead https://github.com/materializecss/materialize 😉

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.

4 participants