package bonsai

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

Install

Dune Dependency

Authors

Maintainers

Sources

bonsai-v0.16.0.tar.gz
sha256=1d68aab713659951eba5b85f21d6f9382e0efa8579a02c3be65d9071c6e86303

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.

WARNING: Customization of auto-generated UIs/Forms is currently under development. Please do not take a dependency on customization logic if you are not ok with the API changing under your feet.

Sourcetype 'a t
Sourcemodule Defaults : sig ... end

create_for_view allows you to specify a custom rendering function for a sexp value whose grammar includes the provided tag name.

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
OCaml

Innovation. Community. Security.