Hi Ryan,
Thank you for contacting Syncfusion support.
We have checked your reported issue and we are able to reproduce it in our end, based on your provided codes. And the cause of this issue is due to breaking changes in @ref functionality in Blazor with Preview8. However, we have already mentioned this in our release notes itself. Please refer the below links for more details.
For your convenience, to avoid this issue we would suggest you to use “suppressField” as like in the below code example.
CODE EXAMPLE:
@using Syncfusion.EJ2.Blazor.Buttons
<EjsButton CssClass="e-flat" IsToggle="true" IsPrimary="true" Content="@Content" @ref="ToggleBtn" @ref:suppressField @onclick="onToggleClick"></EjsButton>
@code {
EjsButton ToggleBtn;
public string Content = "Play";
private void onToggleClick(UIMouseEventArgs args)
{
if (ToggleBtn.Content == "Play")
{
this.Content = "Pause";
}
else
{
this.Content = "Play";
}
}
} |
For more details, please refer the below demo link for toggle button functionality.
Could you please check the above details and get back to us, if you need any further assistance on this?
Regards,
Sangeetha M