Giter Site home page Giter Site logo

Comments (16)

samiheikki avatar samiheikki commented on May 27, 2024 3

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

from vaadin-list-box.

heruan avatar heruan commented on May 27, 2024 2

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:

from vaadin-list-box.

jouni avatar jouni commented on May 27, 2024 2

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.

from vaadin-list-box.

tamasnet avatar tamasnet commented on May 27, 2024 1

+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? 🤓

from vaadin-list-box.

jouni avatar jouni commented on May 27, 2024

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.

from vaadin-list-box.

yuriy-fix avatar yuriy-fix commented on May 27, 2024

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.)

from vaadin-list-box.

heruan avatar heruan commented on May 27, 2024

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.

from vaadin-list-box.

tomivirkki avatar tomivirkki commented on May 27, 2024

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.

from vaadin-list-box.

oluwasayo avatar oluwasayo commented on May 27, 2024

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

from vaadin-list-box.

BlackIsTheNewBlack avatar BlackIsTheNewBlack commented on May 27, 2024

Hello, +1 for the multiple selection feature

from vaadin-list-box.

robeden avatar robeden commented on May 27, 2024

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. 😄

from vaadin-list-box.

robeden avatar robeden commented on May 27, 2024

@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.

from vaadin-list-box.

heruan avatar heruan commented on May 27, 2024

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.

from vaadin-list-box.

jouni avatar jouni commented on May 27, 2024

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).

from vaadin-list-box.

yuriy-fix avatar yuriy-fix commented on May 27, 2024

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

from vaadin-list-box.

jouni avatar jouni commented on May 27, 2024

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.

from vaadin-list-box.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.