chips: allow disable text input
Add option to only disabled the keyboard / input aspect of md-chips while allowing mouse clicks on the delete button. This would essentially become a list of filters which have been selected elsewhere, perhaps in conjunction with a very large multi select. Clicking on X would de-select the filter and remove it from the model list.
Sounds great.
How you imagine this feature? an extra attribute for the chips directive?
Or you have any other thinks?
Immediately I'd think to turn readonly into accepting mixed boolean/array of strings of which components to enable/disable.
But really I think that the md-chips directive is too tightly coupled to having an input and might want to have a md-chips-input wrapper. The spec's chips doesn't neccessarily have inputs: https://www.google.com/design/spec/components/chips.html#
I think readonly with an expression isn't a good idea, we should provide another attribute like ng-deleteonly (for example). What do you think?
About tightly coupled, we can easily change the template of the chips, so the attribute needs to be static and not a binding.
Hold on–how would you delete a chip from the keyboard? It still needs to be operable from an accessibility perspective.
You're right, I should have worded this better. The idea is not to disable keyboard altogether, just remove the text input field. Users can still focus via keyboard, and backspace would behave the same. But moving focus forward would not place focus in an input field where the user can type. Instead it would move on to the next focusable item.
@marcysutton Already done in my Pull Request, check it out ;) #5799
wow that was fast @DevVersion !
:+1: You can also check and build the PR :smile:
+1
@topherfangio moved this to your plate cause you're in charge on the ongoing PR
can any one tel me how to changed the mat-chip input color when it is disabled mode... i want to change border-bottom : 1px dashed #ddd..Now it will show the mat-form-field style