Kukks / Blazor.Ionic

Integration of Ionic5 into Blazor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2-way @bind-Value on bool IonToggle and IonCheckbox don't compile

DanGould opened this issue · comments

Maybe this is because Value is set to type bool? instead of bool

error is: /Users/dan/f/chaincase/app/Chaincase.UI/obj/Debug/netstandard2.1/Razor/Components/SelectableCoin.razor.g.cs(282,282): Error CS1503: Argument 2: cannot convert from 'Microsoft.AspNetCore.Components.EventCallback' to 'Microsoft.AspNetCore.Components.EventCallback' (CS1503) (Chaincase.UI)

This issue remains. I get that there's a way to 2-way bind but @bind-Value doesn't work. ion-checkbox's value attribute and checked attibutes are type bool in javascript. indeterminate is another field entirely. I'm not telling you anything new there.

You're right. I was overthinking this since I was reading the Ionic source instead of the docs which had the value marked as a nullable type. IonToggle and IonCheckbox will now use a bool instead of bool? in the 1.0.7 release