Ad

Combobox And Suffix Slot

- 1 answer

I want to add a component to ComboBox's suffix slot. Based on an old Vaadin forum topic you can do it in Vaadin 13, but it doesn't work with Vaadin 22. Is it possible to do this?

Ad

Answer

There is a better example of setting components to prefix slot of the selected components in Cookbook, which works also with Vaadin 22. The JavaScript method in Forum relies on internal structure of the component that has been changed in Vaadin 22 in order to improve accessibility support.

You can modify the linked recipe to suffix slot as well, but just note that these components have their own button already in the suffix slot, so in most cases, it is not a good idea from the UX perspective to add additional components there.

Ad
source: stackoverflow.com
Ad