Clear | func (m *MultiSelect) Clear() | Clear deselects all options. |
ClearField | func (m *MultiSelect) ClearField() | ClearField resets the selection. Implements FormField. |
FieldValue | func (m *MultiSelect) FieldValue() any | FieldValue returns the selected values as an any ([]string). Implements FormField. |
GetFieldHeight | func (m *MultiSelect) GetFieldHeight() int | GetFieldHeight returns the preferred height for this field. |
GetName | func (m *MultiSelect) GetName() string | GetName returns the field name. |
HasValue | func (m *MultiSelect) HasValue() bool | HasValue returns true if at least one option is selected. |
SelectedIndices | func (m *MultiSelect) SelectedIndices() []int | SelectedIndices returns all selected indices (sorted). |
SelectedOptions | func (m *MultiSelect) SelectedOptions() []SelectOption | SelectedOptions returns all selected options. |
SetExpanded | func (m *MultiSelect) SetExpanded(expanded bool) *MultiSelect | SetExpanded sets whether the dropdown list is open. |
SetFieldValue | func (m *MultiSelect) SetFieldValue(value any) error | SetFieldValue sets the multi-select's value from an any. Accepts []string
(matched against option values) or []int (option indices). Implements FormField. |
SetLabel | func (m *MultiSelect) SetLabel(label string) *MultiSelect | SetLabel sets the field label. |
SetOnChange | func (m *MultiSelect) SetOnChange(handler ChangeHandler[[]SelectOption]) *MultiSelect | SetOnChange sets the change handler (new API). |
SetOptions | func (m *MultiSelect) SetOptions(options []string) *MultiSelect | SetOptions sets the available options. |
SetOptionsWithValues | func (m *MultiSelect) SetOptionsWithValues(options []SelectOption) *MultiSelect | SetOptionsWithValues sets options with custom values. |
SetSelected | func (m *MultiSelect) SetSelected(indices []int) *MultiSelect | SetSelected sets the selected indices. |
SetSelectedIndices | func (m *MultiSelect) SetSelectedIndices(indices []int) error | SetSelectedIndices sets the selected indices, returning an error if any index is out of range. |
SetSelectedValues | func (m *MultiSelect) SetSelectedValues(values []string) error | SetSelectedValues sets the selected options by value. |
Values | func (m *MultiSelect) Values() []string | Values returns all selected value strings.
This method is part of the MultiValueProvider interface. |