package virtual_dom
OCaml bindings for the virtual-dom library
Install
Dune Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=812711b4d5ce634a413580cd7096482de8d71abec9ae37bb01f7c0dcec2968ec
doc/virtual_dom.input_widgets/Vdom_input_widgets/Dropdown/index.html
Module Vdom_input_widgets.Dropdown
Source
Source
val of_values :
?extra_attrs:Virtual_dom.Vdom.Attr.t list ->
?extra_option_attrs:('a -> Virtual_dom.Vdom.Attr.t list) ->
?disabled:bool ->
?merge_behavior:Merge_behavior.t ->
?key:string ->
(module Equal with type t = 'a) ->
'a list ->
selected:'a ->
on_change:('a -> unit Virtual_dom.Vdom.Effect.t) ->
Virtual_dom.Vdom.Node.t
Creates a dropdown that automatically updates when the current value changes and emits typed actions when the user selects a different item.
Source
val of_values_opt :
?extra_attrs:Virtual_dom.Vdom.Attr.t list ->
?extra_option_attrs:('a -> Virtual_dom.Vdom.Attr.t list) ->
?disabled:bool ->
?merge_behavior:Merge_behavior.t ->
?placeholder:string ->
?key:string ->
(module Equal with type t = 'a) ->
'a list ->
selected:'a option ->
on_change:('a option -> unit Virtual_dom.Vdom.Effect.t) ->
Virtual_dom.Vdom.Node.t
Same as of_values
, but includes a blank first entry to represent None
.
Source
val of_enum :
?extra_attrs:Virtual_dom.Vdom.Attr.t list ->
?extra_option_attrs:('a -> Virtual_dom.Vdom.Attr.t list) ->
?disabled:bool ->
?merge_behavior:Merge_behavior.t ->
?key:string ->
(module Enum with type t = 'a) ->
selected:'a ->
on_change:('a -> unit Virtual_dom.Vdom.Effect.t) ->
Virtual_dom.Vdom.Node.t
Instead of passing individual values
, uses all
from the module to determine the items and order.
Source
val of_enum_opt :
?extra_attrs:Virtual_dom.Vdom.Attr.t list ->
?extra_option_attrs:('a -> Virtual_dom.Vdom.Attr.t list) ->
?disabled:bool ->
?merge_behavior:Merge_behavior.t ->
?placeholder:string ->
?key:string ->
(module Enum with type t = 'a) ->
selected:'a option ->
on_change:('a option -> unit Virtual_dom.Vdom.Effect.t) ->
Virtual_dom.Vdom.Node.t
Instead of passing individual values
, uses all
from the module to determine the items and order. Include a blank entry to represent None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>