Closed baltazarO closed 2 years ago
Can you try stopping the event from bubbling up?
Example <Button Clicked="..." @onclick:stopPropagation>END DRY</Button>
Also we introduced a new column parameter to handle these cases could you try it?
From our docs :
PreventRowClick Will set @onclick:StopProgration to true, stopping the RowClick and consequent events from triggering.
Hello! Thanks for replying. I will try it guys.
It work thanks!
Glad we could help :)
Hey guys! I got a problem that maybe you can help me with. I will describe it in detail.
Issue description:
I have a data grid with button(s) in each row. I want to click a button but not the row. Currently what happens is when I click the button itself, the data grid row and the button get selected. These buttons are for recording timestamps.
The reason this is a problem is because the button has an event callback and the data grid's selectedrowchanged has a event callback too. Both of the functions query the database at the same time using entity framework dbcontext. And because of the problem, I am running into backend problems (concurrency issues).
It would be great if the button's eventcallback was executed only.
Steps to reproduce issue
Expected result
Button click submits DateTime.Now to the database Data grid row is not selected
Actual result
Data grid row is also selected App crashes due to concurrency issues (yellow box appears saying to reload the app)
Additional details
Windows 10 Intel Core i5 PC x-64 processor Blazorise (Components, DataGrid, Icons.Material, Material) 0.9.5.6 Visual studio 2022 .NET 6.0
Screenshots
Before:
After: