Use InvokeAsync for async state updates in BandGridBase
Replaced direct StateHasChanged() calls with InvokeAsync(StateHasChanged) to ensure asynchronous state updates. This helps prevent issues that can arise from synchronous state changes during component lifecycle events or event callbacks in Blazor.
This commit is contained in:
@@ -157,7 +157,7 @@ public abstract class BandGridBase<TItem> : ComponentBase
|
|||||||
.Select(c => c.FieldName)
|
.Select(c => c.FieldName)
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
StateHasChanged();
|
_ = InvokeAsync(StateHasChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void UpdateBandOptions()
|
protected void UpdateBandOptions()
|
||||||
|
|||||||
Reference in New Issue
Block a user