MaterialChipsInput icon indicating copy to clipboard operation
MaterialChipsInput copied to clipboard

Add chip manually when enter is pressed on keyboard

Open akhilbv1 opened this issue 7 years ago • 3 comments

How can i add a chip manually when i enter text which is not in the list.

akhilbv1 avatar Sep 06 '18 11:09 akhilbv1

I guess you need to add a text watcher on edit-text of chip-input whenever user enter space just add the text as a form of chip chips_input.addChip(ClassExtendingChipInterface(inputFormChipInput))

mwshubham avatar Sep 21 '18 05:09 mwshubham

but with chips_input.addChip() replaces chips which are already there.

nitinnatural avatar Sep 25 '18 07:09 nitinnatural

It doesn't unit there is some chip validator added e.g. chips_input.setChipValidator { _, _ -> false } This result in adding duplicated.

mwshubham avatar Sep 26 '18 10:09 mwshubham