Looks like they use custom events, you should be able to get by with something like this:

1
JS.Inline("$0.chosen().change($1)", chosen_select, fun () -> (* ... *))
By on 8/21/2019 1:15 AM ()

Yep, this seems ok, thanks.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
type Helper =
    {
        selected: bool
        value: string
    }

let MyOnChange (ev: Dom.Event) = 
    Console.Log("MyChange fired with target", ev.Target)
    let k = ev.Target?options : Helper []
    k
    |> Array.iter (fun x -> 
        if (x.selected) 
        then Console.Log (x.value + " selected ")
    )


let triggerMe = JQuery.Of("#MySelect")
JS.Inline("$0.on('change', $1);", triggerMe, MyOnChange)
By on 8/21/2019 1:32 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper