Skip to content

Commit

Permalink
[BUG] shadows are not updated on onliners change (#315)
Browse files Browse the repository at this point in the history
* Create draft PR for #314

* Shadow base overide onliner property

---------

Co-authored-by: blazej.kuhajda <blazej.kuhajda@mts.sk>
  • Loading branch information
IX-BOT and blazej.kuhajda authored Jun 7, 2024
1 parent 6370aa6 commit 23a2e2b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,26 @@ namespace AXSharp.Presentation.Blazor.Controls.Templates
{
public partial class TemplateBaseShadow<T> : TemplateBase<T>
{
private OnlinerBase<T> _Onliner;

[Parameter]
public override OnlinerBase<T> Onliner
{
get { return _Onliner; }
set
{
if (_Onliner != value)
{
_Onliner = value;
UpdateShadowValuesOnChange(_Onliner);
}
}
}

protected override Task OnInitializedAsync()
{
UpdateShadowValuesOnChange(Onliner);
// UpdateShadowValuesOnChange(Onliner);
return base.OnInitializedAsync();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public IJSRuntime JSRuntime
protected string ToolTipText => Onliner?.HumanReadable;

[Parameter]
public OnlinerBase<T> Onliner { get; set; }
public virtual OnlinerBase<T> Onliner { get; set; }

[Parameter]
public bool IsReadOnly { get; set; }
Expand Down Expand Up @@ -59,7 +59,7 @@ protected T Value
protected override Task OnInitializedAsync()
{
AccessStatus = Onliner.AccessStatus.Failure ? "is-invalid" : "";
ComponentId = Onliner.GetSymbolTail() + "_" + Guid.NewGuid().ToString();
ComponentId = Onliner.Symbol + "_" + Guid.NewGuid().ToString();
return base.OnInitializedAsync();
}
}
Expand Down

0 comments on commit 23a2e2b

Please sign in to comment.