Feliz.ViewEngine icon indicating copy to clipboard operation
Feliz.ViewEngine copied to clipboard

Html.table issue Children now mandatory to avoid type error

Open jkone27 opened this issue 3 years ago • 0 comments

i need now to specify TR as Children elements, else i get a type mismatch error, probably the default inferred signature has changed to the wrong one in latest versions

so conversion done with this doesnt work anymore out of the box too: https://thisfunctionaltom.github.io/Html2Feliz/

error FS0193: Type constraint mismatch. The type 
    'ReactElement'    
is not compatible with type
    'IReactProperty'    
#r "nuget:Feliz.ViewEngine"
open Feliz.ViewEngine

let view =
    Html.table [
        Children [ // throws exception without specifying the Children constructor
            Html.tr [
                Html.th "Company"
                Html.th "Contact"
                Html.th "Country"
            ]
            Html.tr [
                Html.td "Alfreds Futterkiste"
                Html.td "Maria Anders"
                Html.td "Germany"
            ]
            Html.tr [
                Html.td "Centro comercial Moctezuma"
                Html.td "Francisco Chang"
                Html.td "Mexico"
            ] 
        ]
    ]
    |> Render.htmlDocument

jkone27 avatar Aug 23 '22 11:08 jkone27