Reputation: 1249
I'm trying to disable a button if no row is selected in a MudTable, so I'm trying to do something like the following.
Disabled=(selectedRow is null)
How would I do this properly?
Upvotes: 0
Views: 1836
Reputation: 7194
Use the .SelectedItem
property of the MudTable.
<MudTable @ref="mudTable">
<!-- other table stuff inside here -->
</MudTable>
<button disabled="@(mudTable.SelectedItem == null)"
@onclick="DoSomething">Click Here</button>
Upvotes: 0