Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StringValueType is the string value type. StringValueType = "string" // NumberValueType is the number value type. NumberValueType = "number" )
Variables ¶
View Source
var ( // ErrInvalidValueType is returned when the value type is not string or number. ErrInvalidValueType = errors.New("invalid value type") )
Functions ¶
This section is empty.
Types ¶
type SelectOption ¶
type SelectOption struct { Name string `json:"name"` // The id could be number or string, so we use interface{} here. ID interface{} `json:"id"` }
SelectOption represents a select option
func (*SelectOption) Get ¶
func (s *SelectOption) Get() (string, *Selected)
Get returns the name of the option as string and the is as Selected
type Selected ¶
type Selected struct {
// contains filtered or unexported fields
}
Selected is a struct to store the selected value.
func NewSelected ¶
NewSelected creates a new Selected.
func (*Selected) DisplayValue ¶
DisplayValue returns the display value.
func (*Selected) IsSelected ¶
IsSelected returns true if the value is selected.
Click to show internal directories.
Click to hide internal directories.