techniq / mui-downshift

Thin layer over paypal's downshift to use Material UI visual components
https://techniq.github.io/mui-downshift/
MIT License
92 stars 24 forks source link

Multiple selection #5

Open jgoux opened 7 years ago

jgoux commented 7 years ago

I know you saw that issue coming. 😄

It's possible to handle multiple selection with downshift, as demonstrated here : https://codesandbox.io/s/o4yp9vmm8z

It could be great to have it implemented with chips and an expandable input.

techniq commented 7 years ago

I'm actually currently using it with multiple selections but manage the selection in the dropdown (add a rightIcon check) and through a separate component list ("active filters"). It actually replaced my use of material-ui-chip-input which had the multiselection with chips.

It's been on my TODO to support/show an example of multi selection with chips, but's it's low on my priorty since I currently don't have a direct need for it.

As always, I'm open to PRs :). I think mostly it will be just showing an example on how to render it but might need some minor changes to support it.

techniq commented 6 years ago

https://twitter.com/olivtassinari/status/971157478170923016?s=19

bugzpodder commented 6 years ago

Hey Sean, any plans on the 1.0 release with this feature? thanks!

techniq commented 6 years ago

@bugzpodder Hi Jack, I definitely have plans for this (and an official 1.0 release) hopefully soon, but I've been swamped for a while and haven't been able to get around to it yet. Probably a few weeks away (unless someone sends a PR to review 😉).

Btw, there is a [multi select branch]() with some progress and have had some discussions regarding it. There is also an example on material-ui-next and discussed on twitter but the approach in my branch I think covered more use cases (wrapping, etc) although the one on material-ui-next was simplier and maybe the way to go.

Ultimately I'm only looking to support the use case but don't expect much change to the component itself (just a story to show had to make it work).

Chips support was pretty close to being done (after some polish) from what I remember, but I'd like to also support showing the number instead of individual chips (ex. "4 selected").

sibelius commented 6 years ago

any progress on this?

techniq commented 6 years ago

@sibelius Sorry, nothing yet. I made some progress a while back in the multi select branch and then Material-UI provided an example that should port in well but I just haven't had the time / priority to get it done. My end goal is provide some storybook examples on a few different way to due multi-select (chips in input, count in input with checkboxes in items, etc).

Someone should be able to take the chips example on Material UI (or my branch) and get a good start on it (the branch example was working back when I last touched it).

AirborneEagle commented 6 years ago

@techniq I hate to ask, since I am rather sure I know the answer based on the state of the multi-select branch, but has this feature made any progress?

I would really like this. I will put it in my backlog and when the time comes that I need to use it (possibly within the next couple weeks based on current road-map) I will try to pick it up and make a PR.

techniq commented 6 years ago

@AirborneEagle No update yet. It's still on my radar, but waiting for direct need in my current projects before I can dedicate time. I'm also considering dropping the use of react-virtualized (see #54) and would likely tackle that first before revisiting multi-select.

If anyone has any feedback on #54, I would appreciate it. I've been very happy with doing so with mui-table 2.0.0 as it both cleaned up the code tremendously and opened up more use cases (mostly just from leveraging dom/css).

jozsi commented 6 years ago

I created a pull request for this, see #56