package bonsai

  1. Overview
  2. Docs
A library for building dynamic webapps, using Js_of_ocaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=c78c4476ee6b856846e2d0941e5965009d5e1b853e564b2b1bee61202f0b1ebb

doc/bonsai.web_ui_auto_generated/Bonsai_web_ui_auto_generated/Customization/index.html

Module Bonsai_web_ui_auto_generated.CustomizationSource

Customizations allow you to use custom logic for leaves of your view/form generation. When a tagged sexp_grammar is encountered, apply_to_tag will be invoked on the tag's key and value. If apply_to_tag returns true, then the custom logic will be used in place of the default auto-generated logic.

Customizations based on individual fields within a record are not yet supported, only tags applied to entire types will match.

Sourcetype 'a t
Sourcemodule Defaults : sig ... end
Sourceval constant_form : (module Core.Sexpable with type t = 'a) -> apply_to_tag:(key:string -> value:Core.Sexp.t -> bool) -> 'a Form.t Bonsai_web.Computation.t -> form_transformer t

constant allows you to specify a form for the 'a that you're providing custom logic for. This form will be projected to Sexp.t, so that it can be used in the logic for form generation.

Sourceval transform_form : apply_to_tag:(key:string -> value:Core.Sexp.t -> bool) -> form_transformer -> form_transformer t