Skip to content

The ChipField component (2.6.1) is not visible after being added to the layout. #78

@psasoftware

Description

@psasoftware

Describe the bug

The component is not visible after being added to the layout, even though it is present in the DOM.

Image

Expected behavior

The component should be visible.

Minimal reproducible example

  1. Download minimal starter for Vaadin Flow 24 (Spring boot 3.4.4).
  2. Add addon dependency 24.7.1
  3. Add ChipField to layout
  4. Build and run
public class AboutView extends VerticalLayout {

    public AboutView() {
        setSpacing(false);

        ChipField<String> searchField = new ChipField<>("Buscar", s -> s);
        ListDataProvider<String> ldp = new ListDataProvider<>(List.of("GIRASOL", "MAIZ", "SOJA", "TRIGO", "CEBADA", "ARROZ", "AZUCAR", "CANA DE AZUCAR", "CEREALES", "LEGUMBRES"));

        searchField.setWidthFull();
        searchField.setDataProvider(ldp);
        searchField.setClosable(true);
        searchField.setNewItemHandler(label -> label);
        add(searchField);

        setSizeFull();
        setJustifyContentMode(JustifyContentMode.CENTER);
        setDefaultHorizontalComponentAlignment(Alignment.CENTER);
        getStyle().set("text-align", "center");
    }

}

Add-on Version

2.6.1

Vaadin Version

24.7.1

Additional information

The following properties were added to application.properties:

vaadin.allowed-packages = com.vaadin,org.vaadin,com.flowingcode
vaadin.whitelisted-packages = com.vaadin,org.vaadin,dev.hilla,com.flowingcode

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    Status

    Inbox (needs triage)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions