I am trying to display a different SPA view based on the option selected from Doc.Select.
I would like to handle onchange events using WebSharper UI.Next. I have searched around for some information and have seen on
which can be set in the attributes of an Elt
, like so:
spanAttr [on.click (fun el ev -> ())] [text "some span"]
found here: http://www.websharper.com/question/81410/event-handlers-for-ui-next-elt-objects
However, I am quite unsure of how to handle a change on Doc.Select
using the tools available in UI.Next.
I have the following:
let rv = Var.Create "1"
Doc.Select [ ] (fun _ -> "") [ "1"; "2"; "3" ] rv
I am not sure how to get access to onchange events so I can use the router to redirect to a different SPA view.
What is the convention for doing something like changing a view based on the dropdown selection?