-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
[Bug]: DataGrid DetailsRowTemplate doesn't show if event calls Mediator.Send (MediatR) #5323
Comments
Hello @joergkrause I solved your issue by just loading the data outside of the MediaR usage. This makes sure the object references don't change. So it seems like to me that the Let us know if this helps. |
Thanks for digging into this. It's weird that I used Fluxor now whoch has a similar approach and don't see the effect there. I'm going to reach out to the MediatR guys to see whether they can have a look. Also, as far as I remember in Blazor the @key property can be set to anything to handle such scenario. Would that be possible in the Grid here? |
Well I guess you're just further concluding that something with the I would try to focus on the This |
This is an automated message reminding that this issue is expecting the author's answer. |
Blazorise Version
1.4.2
What Blazorise provider are you running on?
Bootstrap5
Link to minimal reproduction, or a simple code snippet
https://github.com/joergkrause/BlazorizeMediatRIssue.git
Steps to reproduce
Using the repo, on start page is a simple DataGrid. Click a row --> template details appear. Set checkbox (this let the SelectedRowChanged event forward a call to Mediator.Send. This executes fine, but it somehow "eats" the event to open the details template. The code definitely returns.
This is basic grid definition:
This is the event handler:
if c==true it's in error, if c==false it works. Mediator.Send itself works and does what's supposed to do (call the handler code and executes it).
What is expected?
Detailsrowtemplate becomes visible on click, regardless the actions in the handler function (as along as without errors)
What is actually happening?
Detailsrowtemplate becomes not visible on click, if the handler contains a call to Mediator.Send from MediatR library.
There is no error or warning or exception.
What browsers are you seeing the problem on?
No response
Any additional comments?
The effect is only on "open" / "show". If the detailstemplate is already visible and you turn the error on, it closes as expected. After this, it doesn't open again. From that I assume that's not really an "eaten" event.
The text was updated successfully, but these errors were encountered: