Documentation
¶
Index ¶
- Constants
- Variables
- type SelectSearch
- func (c *SelectSearch) IconSvg() *sprite.Sprite
- func (c *SelectSearch) Init(_ Ctx)
- func (c *SelectSearch) Render() *Element
- func (c *SelectSearch) SetOptions(options []SsOption)
- func (c *SelectSearch) Style() *style.Sheet
- func (c *SelectSearch) WidgetKind() widget.Kind
- func (c *SelectSearch) WidgetName() widget.Name
- type SsOption
Constants ¶
View Source
const ( PartToggle = widget.Part("toggle") PartDropdown = widget.Part("dropdown") PartHeader = widget.Part("header") PartIcon = widget.Part("icon") PartSearch = widget.Part("search") PartOptions = widget.Part("options") PartOption = widget.Part("option") PartLabel = widget.Part("label") PartDesc = widget.Part("desc") )
View Source
const NameSelectSearch = widget.Name("selectsearch")
NameSelectSearch is the widget name.
Variables ¶
View Source
var ( ClsSsBox = NameSelectSearch.Root() ClsSsToggle = NameSelectSearch.Class(PartToggle) ClsSsDropdown = NameSelectSearch.Class(PartDropdown) ClsSsHeader = NameSelectSearch.Class(PartHeader) ClsSsIcon = NameSelectSearch.Class(PartIcon) ClsSsSearch = NameSelectSearch.Class(PartSearch) ClsSsOptions = NameSelectSearch.Class(PartOptions) ClsSsOption = NameSelectSearch.Class(PartOption) ClsSsLabel = NameSelectSearch.Class(PartLabel) ClsSsDesc = NameSelectSearch.Class(PartDesc) )
Functions ¶
This section is empty.
Types ¶
type SelectSearch ¶
type SelectSearch struct {
Element // value embed — NEVER pointer (TinyGo heap constraint)
Placeholder string // text shown when nothing is selected
Options []SsOption // initial static options
OnSelect func(id, description string) // called when user picks an option
OnSearch func(term string) []SsOption // called when ALL local options are filtered out
// contains filtered or unexported fields
}
func (*SelectSearch) IconSvg ¶
func (c *SelectSearch) IconSvg() *sprite.Sprite
func (*SelectSearch) Init ¶ added in v0.1.7
func (c *SelectSearch) Init(_ Ctx)
func (*SelectSearch) Render ¶
func (c *SelectSearch) Render() *Element
func (*SelectSearch) SetOptions ¶ added in v0.1.7
func (c *SelectSearch) SetOptions(options []SsOption)
SetOptions replaces the option list — safe to call after Init/Render, e.g. once options from an async source (fetch, MCP call) arrive. Preserves the current search query filter, if any.
func (*SelectSearch) Style ¶ added in v0.1.13
func (c *SelectSearch) Style() *style.Sheet
Style defines the selectsearch visual contract using style DSL.
func (*SelectSearch) WidgetKind ¶ added in v0.1.13
func (c *SelectSearch) WidgetKind() widget.Kind
func (*SelectSearch) WidgetName ¶ added in v0.1.13
func (c *SelectSearch) WidgetName() widget.Name
Click to show internal directories.
Click to hide internal directories.