Skip to content
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

customItemPresentation but for chips in vaadin-multi-select-combo-box #7719

Open
DevDuki opened this issue Aug 30, 2024 · 0 comments
Open

customItemPresentation but for chips in vaadin-multi-select-combo-box #7719

DevDuki opened this issue Aug 30, 2024 · 0 comments
Assignees

Comments

@DevDuki
Copy link

DevDuki commented Aug 30, 2024

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 simple span Element 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants