Comments (16)
Created a prototype for multi selection based on the conversation at this ticket.
PR: vaadin/vaadin-list-mixin#54
from vaadin-list-box.
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:
- https://github.com/vaadin/vaadin-combo-box/issues/88
- https://github.com/vaadin/vaadin-select/issues/160
from vaadin-list-box.
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.
+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.
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.
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.
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.
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.
Arrived here when looking for a Vaadin replacement for Swing JList ListSelectionModel
from vaadin-list-box.
Hello, +1 for the multiple selection feature
from vaadin-list-box.
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.
@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.
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.
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.
@jouni, we can follow the same logic as with selectedOptions
and have separate property for multi-selection.
from vaadin-list-box.
Correct me if I'm wrong, @jouni:
vaadin-list-box
is used byvaadin-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)
- "Tabs that cover the entire width of the tab bar" doesn't cover entire width HOT 1
- Fix vaadin-list-box theme
- Ensure Polymer 3 Modulizer compatibility
- Uncaught TypeError: Cannot read property 'focus' of undefined HOT 1
- An example needed on using items property HOT 3
- Item padding is wrong when using RTL HOT 1
- Incorrect initial rendering in Edge HOT 2
- vaadin-list-box is not working with paper-menu-button HOT 4
- Screen reader support is lacking HOT 2
- Show a warning of missing vaadin-item
- Update docs for multi select listbox
- Disabled and Readonly seem not to work HOT 1
- Improve demos HOT 4
- Generate TypeScript definitions for P3
- Adopt DataView API for ListBox & MultiSelectListBox
- MultiSelectListBox doesn't respect DataProvider::getId HOT 1
- Polymer 3 conversion and TS event type definitions
- 2.5.0 is missing _scrollToLastSelectedItem HOT 1
- MultiselectListBox looses its value after remove() and add() HOT 3
- Multiselectlistbox setvalue not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vaadin-list-box.