Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [%%shared
- let filters_form ((r, f) : react_pointer) (model : Model.t) =
- let supplier_dropdown = Lib.get_suppliers model.suppliers in
- ....
- ignore [%client
- ((Lwt.async @@ fun () ->
- Js_of_ocaml_lwt.Lwt_js_events.clicks btn @@ fun _ _ ->
- ...
- let visibility = {
- ...
- } in
- Controller.update (Change_visibility visibility) (~%r,~%f);
- Lwt.return_unit)
- :unit)
- ];
- div ~a:[a_class ["form-row"; "align-items-end"]] [
- div ~a:[a_class ["form-group"; "col"]] [label [txt "Supplier"]; supplier_dropdown]
- ]
- let filters ((r, f) : react_pointer) =
- let get_filters () =
- let all = Eliom_shared.React.S.map [%shared fun x -> [x]] r in
- let rl = Eliom_shared.ReactiveData.RList.from_signal all in
- let rl = Eliom_shared.ReactiveData.RList.map [%shared (filters_form (~%r, ~%f))] rl in
- rl
- in
- Eliom_content.Html.(R.div (get_filters ()))
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement