TokenList : hide in options list entries already added as tokens

Hi

When using TokenList, once you have selected and added a token for an entry, this entry is still proposed in the options list.

But you cannot add it anyway if you reclick on it. So it would be interesting to hide entries that have already been added as token from the options list.

Of course one can manage the options list content by hand, and so remove and add items based on current token list. But when you want this as a global behavior on a whole application, this is kind of boiler plate code.

image

Regards
Michael

Hello,

you can add this feature to a component by extending TokenList. Register your implementation, and it will be used automatically in the whole project.

See an example of how to extend and register a component:

But in your case, in the XML use <name>tokenList</name> to change CUBA implementation.

In Jmix this feature is implemented in TagPicker (see hideSelectedOptions attribute).