New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blazor Conditional Display: Item Doesn't Disappear and Then Appears Double #22097
Comments
I don't see the show/hide buttons. Are they in the same component on another component (and is it the parent)? Also, is ShowPayPal a public property decorated with [Parameter]? |
@mysteryx93 thanks for contacting us. I'm not sure what those components you are using do. I would suggest you file an issue with the Radzen folks as it is not clear that this is an issue in Blazor itself or one of those components. If you can produce a repro with vanilla components we can take a look at it. That said, there are some challenges with using radio buttons and bind. See here for details |
I'm using the free Radzen controls available on NuGet. ShowPayPal is a bool field, how you change its value doesn't (shouldn't) matter. My guess is that the problem is editing the collection directly with the conditional @if. Is this supposed to be a supported scenario? If I use the standard radio buttons as in the doc, then there is no collection edit as the controls are individual, so that won't reproduce the issue. |
@mysteryx93 Blazor wise there is no issue with the But I don't know how that specific component handles the state and maybe they have a bug that prevents you from doing those kinds of modifications. I would suggest you follow up with the Radzen folks since this seems like a behavior in their control. |
@mysteryx93 It does matter. |
Here's a beautiful reproduction
|
Please email me a zipped solution, or a URL to a repo. |
Sent. Also Radzen said "Thanks! It will be fixed in the next update!" |
I thought it might be a radzen bug. I suppose you can close this ticket now and wait for them to fix it :) |
ok they say they'll fix it in their library so I can close this |
Using Blazer Server on .NET Core 3.1
Using this code
ShowPayPal should show and hide the 3rd option. Setting it to false doesn't hide it; but setting it back to true makes a 2nd option button appear.
As a work-around, perhaps I can set Visible="@ShowPayPal" on the 3rd option? Well, then if I have a button for show and a button for hide, it only shows or hide after clicking a 2nd time; its behavior comes too late.
The text was updated successfully, but these errors were encountered: