customItemPresentation but for chips in vaadin-multi-select-combo-box
Describe your motivation
Similar to the custom item presentation, but for the chips in the input field in vaadin-multi-select-combo-box. I would like to color code them via a hash function. In other words, the chips represent users and to be able to distinguish each user, I use a hash function on its id property, so that each user has its own color. I use the same mechanism to color code a user's avatar background throughout the application, which is why I would love to reuse them here, so that a user recognises a selected user from other parts of the application. Right now I can't do that, not even via the itemClassNameGenerator. because each user has a unique color code.
Describe the solution you'd like
- Perhaps the same mechanism like the
customItemPresentation, just for the chips (customChipPresentation?). I can then inline style a simplespanElement or something like that.
Describe alternatives you've considered
I was thinking of abusing the itemClassNameGenerator but I couldn't figure out how to deal with unique color codes for each user.
Additional context
No response