Package com.vaadin.flow.component.shared
Interface HasSuffix
- All Superinterfaces:
HasElement
,Serializable
- All Known Subinterfaces:
HasPrefixAndSuffix
- All Known Implementing Classes:
AbstractNumberField
,BigDecimalField
,Button
,DrawerToggle
,EmailField
,IntegerField
,NumberField
,PasswordField
,SideNavItem
,TabSheet
,TextArea
,TextField
,TextFieldBase
Mixin interface for components that have a suffix slot.
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptiondefault Component
Gets the component in the suffix slot of this field.default void
setSuffixComponent
(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
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 benull
to remove existing suffix component
-
getSuffixComponent
Gets the component in the suffix slot of this field.- Returns:
- the suffix component of this field, or
null
if no suffix component has been set - See Also:
-
#setPrefixComponent(Component)
-