-
Notifications
You must be signed in to change notification settings - Fork 16
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
Allow to create new chips in autocomplete mode #59
Comments
+1 |
Nice feature! PRs are welcome! |
This feature would be nice but I wonder which value/key we'll use for a new chip (with a label not present in the datasource) ... |
The label (aka display-property) for the new chip would be the text user entered into input field. The value would be undefined. Perhaps there could be a property user can assign callback func which inits new chip's object (ie assigns value property), but IMO it would have to work without it too... I'm not familiar with the inner workings of this component, does it require (unique?) key for each chip? Does it make sense to say that when the chip doesn't have key assigned it is considered to be NULL and each NULL is distinct from other NULLs (like in relational database)? |
@ainvaltin that's dirty. Currently, The label is a different thing. Value and label may be different. Just as example, the mobile Gmail app shows the name of your contact (instead of the email address) if address book has it.
<select>
<option value="1">label one</option>
<option value="2">label two</option>
</select> and for the same reason Your case can only work when the label is used as PRs are welcome! |
Add property
allowAdd
which when set totrue
would allow to create new chip in input even when the entered text is not present in thedatasource
.The text was updated successfully, but these errors were encountered: