vaadin / vaadin-core

Home Page:https://vaadin.com/docs/latest/ds/overview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement Custom Field

jouni opened this issue · comments

This element could provide the commonly needed label and error-message features, including the required and invalid properties.

The focused state should probably somehow work together with the ControlStateMixin

This would be useful in at least the following elements:

  • Text field
    • Combo box
    • Date picker
    • Dropdown menu
  • Radio group
  • List box

In addition, 3rd party elements would have an easy way to make their field elements work the same way.

This mixin/element should probably offer the value property as well, since that goes hand-in-hand with required and invalid.

I think also vaadin-upload, although currently it does not have label

Additional thought: <vaadin-form-item> could probably be the element/component that provides this feature.

Agree, that would make vaadin-form much easy to align labels with the current theme.
For instance form-item does not work for material and you need to set the label manually to each input element