Closed DanGould closed 3 years ago
Yes, there is an example of ion toggle in the dark mode preferences page in chaincase. It is a nullable bool and the type must match for the event callback to match.
The reasoning behind it is that a checkbox can have 3 states: checked, unchecked and indeterminate
On Thu, 24 Dec 2020, 20:41 Dan Gould, notifications@github.com wrote:
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)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Kukks/Blazor.Ionic/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN357RL6ECULFTUDKSGXQTSWOKPBANCNFSM4VIPO2ZA .
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
Maybe this is because Value is set to type
bool?
instead ofbool
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)