Value_selector.Menu
Menu selector
The value is selected in a list of elements via a drop down menu. See the styling information.
val v : ?class':Jstr.t -> ?enabled:bool Note.signal -> ('a -> Jstr.t) -> 'a list Note.signal -> 'a Note.signal -> 'a t
v ~class' ~enabled label choices sel
is a menu for selecting a value. S.eq sel
is used to test values for equality in the list of choices
.
label
is used to label the values to selectchoices
are the values among which to selectsel
is the value shown as selected it must be included in choices
enabled
indicates if the selector can be interacted with. Defaults to Note.S.Bool.true'
class'
is added to the underlying element's classes.val action : 'a t -> 'a Note.event
action s
occurs whenever a new value is selected.
val enabled : 'a t -> bool Note.signal
enabled s
is true
iff the selector is enabled.
The element returned by el
makes use of the following CSS classes:
ui-menu-selector
always.ui-disabled
whenever enabled
is false
.