charton API / @chart-on/ui / index / MenuButton
Interface: MenuButton
Defined in: ui/src/controls.ts:170
A dropdown made by menuButton: its element, set to change the selected value, and open to show the list.
Properties
el
el:
HTMLDivElement
Defined in: ui/src/controls.ts:171
Methods
destroy()
destroy():
void
Defined in: ui/src/controls.ts:178
Close the list and stop listening for clicks outside it; call when removing the control.
Returns
void
open()
open():
void
Defined in: ui/src/controls.ts:174
Open the list, as a click on the trigger does; nothing when it is open.
Returns
void
set()
set(
value):void
Defined in: ui/src/controls.ts:172
Parameters
value
string | undefined
Returns
void
update()
update(
patch):void
Defined in: ui/src/controls.ts:176
Change the accessible name, the visible text or the options, e.g. in a new language. An open list closes.
Parameters
patch
label?
string
options?
text?
string
Returns
void