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

Multiple selection feature #10

Closed
yuriy-fix opened this issue Nov 10, 2017 · 16 comments
Closed

Multiple selection feature #10

yuriy-fix opened this issue Nov 10, 2017 · 16 comments
Assignees
Labels
DX tests finding Reported during DX tests question Question about using the component
Projects

Comments

@yuriy-fix
Copy link
Contributor

Several UX/DX tests participants would like to see multiple selection functionality in vaadin-list-box, so it will be possible to select multiple options by just adding multiple attribute to vaadin-list-box. (Selection process similar to native select-option multiple selection)

@yuriy-fix yuriy-fix added feature question Question about using the component DX tests finding Reported during DX tests labels Nov 10, 2017
@jouni
Copy link
Member

jouni commented Nov 10, 2017

This has always been on the possible feature list and very likely needed.

The problem is then how we handle the selected property (and the possible value property). Does selected return an array when the multiple property is set? Not sure how nice that kind of API is, that we couple properties tightly together.

@yuriy-fix
Copy link
Contributor Author

I think there is a way to do that. As multiple attribute in this case will introduce another way of selection functionality, we can introduce another property multiple-selected which will contain array of selected values. In the input part the items will be shown one by one with some delimiter (, | etc.)

@heruan
Copy link
Member

heruan commented Apr 2, 2018

Is this something we can expect out of beta? IIRC Grid also supports single/multi selection modes, List Box may handle this the same way.

@tomivirkki
Copy link
Member

New features will need to wait for a minor release (after the stable is out). So this could be included in 1.1.0 earliest.

@oluwasayo
Copy link

Arrived here when looking for a Vaadin replacement for Swing JList ListSelectionModel

@BlackIsTheNewBlack
Copy link

Hello, +1 for the multiple selection feature

@robeden
Copy link

robeden commented Dec 27, 2018

I could definitely see multi-selection making the (Flow, especially) API odd. Perhaps the best thing in that case would be "vaadin-multi-list-box" (or something) so the APIs wouldn't have to support both. In Vaadin 8, some of the APIs we quite strange from supporting both single and multiple selection.

But at the end of the day... the UI for this component with multiple selection is exactly what I want. 😄

@tamasnet
Copy link

tamasnet commented Feb 8, 2019

+1

I realize this wasn't the philosophy vaadin-list-box was built on, but isn't single-selection a special case of multi-selection? 🤓

@heruan
Copy link
Member

heruan commented Feb 9, 2019

Vaadin definitely lacks a multi-select component. The only way to achieve this is using the grid, which is an overkill for a simple multi-select and doesn't always fit. Related issues:

@jouni
Copy link
Member

jouni commented Feb 9, 2019

Vaadin definitely lacks a multi-select component.

Very much agreed. It’s more than sad IMO that one of the oldest issues for the whole component set is ”multi-select for combo box”.

The current plan is to work on a multi-selection component next quarter. We figured we’d start with combo box, as it has been there for a long time and we’ve seen the community and customers build their own versions of it already, so it seems the most requested one.

If you think we should start with list-box instead, please let us know.

@robeden
Copy link

robeden commented Feb 9, 2019

@jouni - I think there’s room for both, so I have no objection to combo boxes. The only argument I’d make for this one is it seems quite a bit simpler (from a UX and implementation perspective) so it might take less time to complete.

@heruan
Copy link
Member

heruan commented Feb 9, 2019

Correct me if I'm wrong, @jouni: vaadin-list-box is used by vaadin-select, so this and vaadin/vaadin-select#160 are basically the same issue?

Talking about priorities, I think that if multi selection isn't implementent in both component during a short time frame, users might choose the wrong component just beacuase it has the feature (and the other not yet).

Multi selection is more a crossing-cut concern than a single-component feature and I'd like to see a common pattern used among Vaadin components.

@jouni
Copy link
Member

jouni commented Feb 11, 2019

but isn't single-selection a special case of multi-selection?

Yes, it is. Not sure why we did it like that with grid but then went the other way with list box.

Does anyone have opinions about the API? The suggestion in the description of using an additional multiple seems alright to me. Then the only trouble I see is in the value property, how that should be parsed into a valid selection (as it’s a string).

@yuriy-fix
Copy link
Contributor Author

@jouni, we can follow the same logic as with selectedOptions and have separate property for multi-selection.

@jouni
Copy link
Member

jouni commented Feb 11, 2019

Correct me if I'm wrong, @jouni: vaadin-list-box is used by vaadin-select, so this and vaadin/vaadin-select#160 are basically the same issue?

Basically, yes.

Multi selection is more a crossing-cut concern than a single-component feature and I'd like to see a common pattern used among Vaadin components.

Yes, that should be the target, that all components that manipulate some selection would have the same API.

Talking about priorities, I think that if multi selection isn't implementent in both component during a short time frame, users might choose the wrong component just beacuase it has the feature (and the other not yet).

I understand the concern, but I’m not sure what we should do about that, except throw more developers at it 😄 Not sure if this is such a big concern that we can afford to put more hands implementing it for all the components at the same time.

we can follow the same logic as with selectedOptions and have separate property for multi-selection.

Yeah, that looks good. That should align with Grid and Combo Box as well.

@jtomass jtomass added this to 📬  Inbox in vaadin-core Mar 29, 2019
@tomivirkki tomivirkki changed the title Multiple selection feature requested. Multiple selection feature Mar 29, 2019
@samiheikki
Copy link
Contributor

Created a prototype for multi selection based on the conversation at this ticket.
PR: vaadin/vaadin-list-mixin#54

Screenshot 2019-06-30 at 13 37 50

Screenshot 2019-06-30 at 13 37 43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX tests finding Reported during DX tests question Question about using the component
Projects
No open projects
vaadin-core
  
📬  Inbox
Development

No branches or pull requests