To focus the search input from anywhere on the page, press the 'S' key.
in-package search v0.1.0
This is a module for building forms that allow the user to edit complicated types (for example, configs).
'a Sexp_form.t gives you a form for editing values of type
It is called
Sexp_form because it relies on the fact that
'a can be represented as a sexp. Specifically, it is capable of parsing the sexp representation of
'a to fill out the default values for the fields of the form automatically.
This means that if you have a type
'a which defines
sexp_of_a, you can specify a default value of type
'a when rendering the
Sexp_form has other useful functionality beyond just parsing default values.
list : 'a Sexp_form.t -> 'a list Sexp_form.t converts a form for editing
'a into a form for editing
This gives the user buttons to add and delete elements and remembers deleted elements so that the user can undo.
Note: If you can't convert
'a to a sexp, you can still construct a
'a Sexp_form.t. You will just be unable to specify default values for the form.
val simple : 'a t
val with_default : sexp_of_t:('a -> Core.Sexp.t) -> default:'a -> diff:(original:Core.Sexp.t -> updated:Core.Sexp.t -> Incr_dom.Vdom.Node.t) -> ?between:Incr_dom.Vdom.Node.t -> unit -> 'a t
Used to display
default as the initial value of your sexp_form. Also displays
diff for the user to understand how the values entered into the form differ from the
between is a node which will be displayed between the form and the diff.
val no_diff : original:Core.Sexp.t -> updated:Core.Sexp.t -> Incr_dom.Vdom.Node.t
no_diff produces an empty