Skip to content

Commit

Permalink
šŸ› fix(DefaultsProvider): doesn't work when set defaults for componentā€¦
Browse files Browse the repository at this point in the history
ā€¦ has generic type (#438)
  • Loading branch information
capdiem authored Jun 27, 2023
1 parent 5b42cff commit 1316530
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ public ForwardRef RefBack
private bool _shouldRender = true;
private string[] _dirtyParameters = Array.Empty<string>();

protected virtual string ComponentName => this.GetType().Name;
protected virtual string ComponentName
{
get
{
var type = this.GetType();
return type.IsGenericType ? type.Name.Split('`')[0] : type.Name;
}
}

public override async Task SetParametersAsync(ParameterView parameters)
{
Expand Down

0 comments on commit 1316530

Please sign in to comment.