react.fieldwellitem.md
April 7, 2023 ยท View on GitHub
Home > @datashaper/react > FieldWellItem
FieldWellItem interface
Defines an available field well. This includes UX properties for how to visually represent it (title, icon, etc). This implementation is rendered with a dropdown, and is in many ways just a fancy stylized dropdown.
Signature:
export interface FieldWellItem
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| disabled? | boolean | (Optional) Indicate if the well is disabled - this will render the well as disabled. | |
| icon? | string | (Optional) Name of an icon to render in front of the well dropdown. | |
| key | string | Unique key for the well. | |
| onChange? | (key: string) => void | (Optional) Change handler for the dropdown, presenting the new selected key. | |
| onReset? | () => void | (Optional) Handler to indicate that a field well has been reset to its default state (no binding). | |
| options? | ISelectableOption[] | (Optional) List of valid options that this field well can be set to. | |
| placeholder? | string | (Optional) Placeholder for the dropdown when no value is selected. | |
| required? | boolean | (Optional) Indicate if the well is required - this will render a red asterisk next to the title. | |
| selectedKey? | string | (Optional) Selected key for the dropdown. | |
| title | string | Title to display above the well. |