Documentation ¶
Index ¶
- Constants
- func APISelect(document js.Value, apiURL, inputName string, selected *selector.Selected) js.Value
- func Button(document js.Value, label string) js.Value
- func CheckBox(document js.Value, inputName, inputID, inputLabel string, ...) js.Value
- func CheckBoxList(document js.Value, listName, listLabel, listTitle, apiURL string) js.Value
- func CreateElement(document js.Value, tagName string, attrs map[string]interface{}) js.Value
- func Div(document js.Value, attributes map[string]interface{}) js.Value
- func Form(document js.Value, attributes map[string]interface{}) js.Value
- func H1(document js.Value, text string) js.Value
- func Input(document js.Value, inputType string, attributes map[string]interface{}) js.Value
- func Label(document js.Value, label, labelFor string) js.Value
- func P(document js.Value, text string) js.Value
- func SimpleAPISelect(document js.Value, apiURL, inputName string, selected *selector.Selected) js.Value
- func SimpleSelect(document js.Value, options selector.SelectOptions, inputName string, ...) js.Value
- func Span(document js.Value, text, classList string) js.Value
- func TextNode(document js.Value, text string) js.Value
Constants ¶
const ( // MainWrapperClassName is the class name for the main wrapper. MainWrapperClassName = "select-wrapper" // OptionsWrapperClassName is the class name for the options wrapper. OptionsWrapperClassName = "select-options-wrapper" // OptionClassName is the class name for an option. OptionClassName = "select-option" // OpenClassName is the class name for the open state. OpenClassName = "open" )
Variables ¶
This section is empty.
Functions ¶
func APISelect ¶
APISelect returns a new select element. The options are gathered from the API. The input field on the select element is a search field. Once it changes, the options are filtered from the API. It allows the user to select an option from the filtered options. Also possible to add a new option.
func CheckBox ¶
func CheckBox(document js.Value, inputName, inputID, inputLabel string, inputValue interface{}, selected bool) js.Value
CheckBox returns a new checkbox element.
func CheckBoxList ¶
CheckBoxList returns a new list of checkbox list elements.
func CreateElement ¶
CreateElement returns a new element.
func SimpleAPISelect ¶
func SimpleAPISelect(document js.Value, apiURL, inputName string, selected *selector.Selected) js.Value
SimpleAPISelect returns a simple select element. The document input parameter is the document. The next input parameter is the map of options.
func SimpleSelect ¶
func SimpleSelect(document js.Value, options selector.SelectOptions, inputName string, selected *selector.Selected) js.Value
SimpleSelect returns a simple select element. The document input parameter is the document. The next input parameter is the map of options.
Types ¶
This section is empty.