Package com.vaadin.flow.component.shared
Interface HasClearButton
- All Superinterfaces:
HasElement
,Serializable
- All Known Implementing Classes:
AbstractNumberField
,BigDecimalField
,ComboBox
,ComboBoxBase
,DatePicker
,EmailField
,IntegerField
,MultiSelectComboBox
,NumberField
,PasswordField
,TextArea
,TextField
,TextFieldBase
,TimePicker
Mixin interface for components that support a clear button.
Used to toggle the visibility of the clear button.
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Gets the visibility of the button which clears the field, which isfalse
by default.default void
setClearButtonVisible
(boolean clearButtonVisible) Sets the visibility of the button which clears the field.Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Method Details
-
isClearButtonVisible
default boolean isClearButtonVisible()Gets the visibility of the button which clears the field, which isfalse
by default.- Returns:
true
if the button is visible,false
otherwise
-
setClearButtonVisible
default void setClearButtonVisible(boolean clearButtonVisible) Sets the visibility of the button which clears the field.- Parameters:
clearButtonVisible
-true
to show the clear button,false
to hide it
-