Package com.vaadin.flow.component.shared
Interface HasSuffix
- All Superinterfaces:
com.vaadin.flow.component.HasElement,Serializable
public interface HasSuffix
extends com.vaadin.flow.component.HasElement
Mixin interface for components that have a suffix slot.
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptiondefault com.vaadin.flow.component.ComponentGets the component in the suffix slot of this field.default voidsetSuffixComponent(com.vaadin.flow.component.Component component) Adds the given component into this field after the content, replacing any existing suffix component.Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Method Details
-
setSuffixComponent
default void setSuffixComponent(com.vaadin.flow.component.Component component) Adds the given component into this field after the content, replacing any existing suffix component.This is most commonly used to add a simple icon or static text into the field.
- Parameters:
component- the component to set, can benullto remove existing suffix component
-
getSuffixComponent
default com.vaadin.flow.component.Component getSuffixComponent()Gets the component in the suffix slot of this field.- Returns:
- the suffix component of this field, or
nullif no suffix component has been set - See Also:
-
#setPrefixComponent(Component)
-