Closed dsshep closed 2 years ago
No problem, figured it out. You need to use the ref
callback, which may pass null
, and you'll need to have open Fable.Core.JsInterop
to use the ?
dynamic syntax:
Html.input [
prop.type' "checkbox"
prop.ref (fun e ->
if e = null then () else
e?indeterminate <- (* set the bool state here... *))
]
What is the correct way of setting a checkbox to an indeterminate state? There seems to be no logical way within the API. If there isn't, perhaps
prop.isChecked
should accept aNullable<bool>
orbool option
to support this?