// package selector provides a single and multi-slect HTML element powered by Choices.js package selector import ( "fmt" "encoding/json" "github.com/google/uuid" ) type FieldOptions []Option // Option is a select option type Option struct { ID uuid.UUID `json:"id"` Value string `json:"value"` Label string `json:"label"` Order int `json:"order"` Selected bool `json:"selected"` Disabled bool `json:"disabled"` } // ContentID is the HTML element ID where content for this option is rendered when OptionsContent is rendered func (i Option) ContentID() string { return fmt.Sprintf("option-%s-content", i.ID) } // SelectArgs are the arguments used to initialize selector.Selector // // ID: element ID for the element // // LabelClass: The CSS class(es) for the