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

Enable Search in SelectField #5386

Closed
sujilnt opened this issue Oct 13, 2016 · 22 comments
Closed

Enable Search in SelectField #5386

sujilnt opened this issue Oct 13, 2016 · 22 comments
Labels
component: select This is the name of the generic UI component, not the React module! v0.x

Comments

@sujilnt
Copy link

sujilnt commented Oct 13, 2016

Problem description

i wanted to create a component in material ui like adding a input searchbox inside a selectfield, Right now I have done using autocomplete but its not giving accepted behaviour .
pasted image at 2016_10_12 04_18 pm

@sujilnt sujilnt changed the title Input Search box inside Select field Enable Search in SelectField Oct 13, 2016
@nsisodiya
Copy link

Let me explain the issue.
We are using SelectField but we want a search field inside SelectField which can be controlled by flag called enableSearch.

This will be useful when item list is very long. Example country dropdown !!

@oliviertassinari
Copy link
Member

oliviertassinari commented Mar 26, 2017

I'm closing that issue for #1956. It has been resolved with 3 potential solutions. Have a look at the end of the thread.

@lorinkoz
Copy link

Hey there!
Sorry, looks like the solutions proposed in #1956 don't match the desired behavior in this thread. Any chance to reopen this?

@kavink
Copy link

kavink commented Jan 18, 2018

@oliviertassinari This request does not seem like a multi select one, But for long list allow user to type and filter from select list , So someone does not need to scroll a long list.

@nlicht
Copy link

nlicht commented Jan 24, 2018

hey, joining @kavink - looking for the same functionality

@kavink
Copy link

kavink commented Jan 24, 2018

@nlicht I have started using paypal/downshift instead for now. Unless you can afford to wait for this probably dead issue.

@vladimirivanoviliev
Copy link

vladimirivanoviliev commented Mar 7, 2018

This should be reopened as currently I don't see straight forward way of achiving it, however it's very common to want to filter the result set.
Edit:
Example of searching inside select lists:
Kendo DropDownList

@oliviertassinari
Copy link
Member

@vladimirivanoviliev I believe some people have already been achieving such in the v1-beta.

@nlicht
Copy link

nlicht commented Mar 13, 2018

@vladimirivanoviliev can you please reference this?
Looking at the v1-beta docs: https://material-ui.com/demos/selects/
I can't find this capability

@vladimirivanoviliev
Copy link

vladimirivanoviliev commented Mar 19, 2018

@oliviertassinari currently I can only see such functionality in the 'Native Select' component (which is having it as the native element supports it) - the regular one still does not have it.

Edit: Also as the v.1 is still in beta It would be nice to see this in the current (0.9xx) version of the components.

@oliviertassinari
Copy link
Member

oliviertassinari commented Mar 19, 2018

Also as the v.1 is still in beta It would be nice to see this in the current (0.9xx) version of the components.

@vladimirivanoviliev What version are you referring to 0.9xx? We encourage the usage of the v1-beta version for new projects. The v0.x versions are in a legacy mode with low support.

@vladimirivanoviliev
Copy link

@oliviertassinari - the version I'm referring to is the current stable one v0.2x (sorry for the typo). The project was started when the v.1 was in early beta (and doesn't work well in our cases) which is why I decided to go with the previous official release. I will upgrade to it when it's released officially as my project is already in production (using betas is not an option for me).

@bityogi
Copy link

bityogi commented Apr 17, 2018

For people coming to this page looking for a searchable select field, please look into the material-ui AutoComplete component.

@maibono
Copy link

maibono commented May 9, 2018

@bityogi Autocomplete lets you write anything other than the options.

Use react select ( though) it's not material
https://github.com/JedWatson/react-select

Hope somebody makes a material UI for react select

@semi-sentient
Copy link

This looks extremely promising: https://github.com/Sharlaan/material-ui-superselectfield

I have not yet had a chance to implement it, but from looking at the demo it's exactly what folks have been asking for, which is a way to filter a large list and make multiple selections.

@RudmanMario
Copy link

Is there any progress here?
Using non material-ui solutions brings a problem with the form validation (I'm using form validation specific for material ui components).

@semi-sentient It looks like that solution is still using 0.x version.

@ninjabunny
Copy link

I kinda mash together a TextField Menu + Popper, but it does not have keyboard support. Anyone find a solution that includes the keyboard?

@mvitzthum
Copy link

mvitzthum commented Sep 25, 2019

I made a small component you might wanna check out.
https://github.com/DCCS-IT-Business-Solutions/react-searchable-select-mui
Unfortunately there is no arrow-key Support (yet?) :)

@oliviertassinari
Copy link
Member

Would #17037 help?

@KeitelDOG
Copy link

For people coming to this page looking for a searchable select field, please look into the material-ui AutoComplete component.

The Autocomplete is a very good one that fit my need. However you'll need to install Lab package npm install @material-ui/lab.
Surely I can play around to even load new data while typing. And it does not select anything if you don't click on one or type it correctly. So it's a like a search, except the search input is no inside the list view, but on the input itself

@huang-tianwen
Copy link

more than 3 years, still not supported?

@mui mui locked as resolved and limited conversation to collaborators May 9, 2020
@oliviertassinari
Copy link
Member

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: select This is the name of the generic UI component, not the React module! v0.x
Projects
None yet
Development

No branches or pull requests