Comments (4)
Hi @lepipele ,
Actually yes, the next release will have something similar to that. I'll be moving toward the more traditional "label & value" concept of HTML's select-options element (well at the moment we already have the labels, but I use the boolean tick-property
instead of a list of values).
I am currently considering some options such as:
output-list
: something like you mentioned earlier - this is also logical given that most of us store multiple selection in a, say, comma separated list, in our database.- We'll also have
preselected-list
and/or maybepreselected-model
- In determining which items are preselected; most likely the
tick-property
will stay, but the newpreselected-list
and/orpreselected-model
will have higher priority.
I assume that these changes are rather necessary for the AJAX-based input loading.
This is also the reason why at the moment I'm a bit restrictive in accepting pull requests. Working on the core logic of the directive, I'm afraid there will be quite some things affected here and there.
Btw since version 2.0.0, you no longer need to specify class="multiSelect"
in your input model's HTML code.
Thanks for the kind words, glad the directive works for you! Do help me to spread it to those who might need it.
from angular-multi-select.
Well, if you are on it, I guess I'll just hang on and see how it turns out.
For separating preselected-list and output-list - I really believe in databinding model - UI controls are just what allows common user to tweak the data behind that's then used in algorithms.
In that sense, as long as they can bind to same value, I'm OK with that. Although I think the better approach would be to have something like databind-list & output-list - where databind-list is the one that gets pre-selected and modified as user changes selection. Output-list would be just extra option in case developer wants to output list of selected items for something else.
I think that in 99% of cases developers are working with unique IDs in select elements (if you are not then you would probably benefit from changing your database structure and have unique id as simple primary key instead of complex key with multiple fields... if you really want complex keys you can always go with generating unique key by doing: field1-field2 ... etc)... and because of that they would really benefit from databinding.
Anyways, thanks again for the great component and I look forward to seeing how it'll be improved. As for spreading the word - of course - everyone should have UI component like this in their arsenal ;)
from angular-multi-select.
I actually disagree with @lepipele on "developers are working with IDs". For a very simple app - maybe it is sufficient, but anything more involved with any hint of a business logic or domain entites having just IDs is very detrimental. Also, generating keys via "field1-field2" is a horrible hack which I would very strongly argue against.
from angular-multi-select.
...
from angular-multi-select.
Related Issues (20)
- How to add tooltip for each dropdown element? HOT 9
- how to add default text when data is not bound to multiselect? HOT 1
- Reset doesn't set all values' 'ticked' property to false HOT 2
- output-model needn't be a compulsory attribute HOT 4
- Is there any angular 4 version of this available ? HOT 2
- Use same input-model to multiple multiselectors? HOT 4
- Select items from single group only
- XSS attack by option name
- Mutli select not support direction
- how to select all items loaded on the control??
- How to prevent .length == 'undefined' error when populating dropdown via on-open
- Filtering problem when grouped
- Grouping
- Issue injecting multi-select directive into another directive with same scope
- make filter clear button 'x' icon encoded
- Possible to launch dropdown from custom button?
- will it be possible to give remove option to the selected items in the ui HOT 1
- Search not working when grouping is enabled.
- Any ways to dynamically update helper-elements?
- Multiple elements selected when only one is clicked HOT 1
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 angular-multi-select.