Skip to content

Commit

Permalink
fixed issue with two different tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
joao4all committed Jul 29, 2024
1 parent b0dc601 commit de4cdfb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Copyright (c) 2024 Starion Group S.A.

@inherits COMET.Web.Common.Components.Applications.SingleIterationApplicationBase<COMETwebapp.ViewModels.Components.ParameterEditor.IParameterEditorBodyViewModel>

<LoadingComponent IsVisible="@(this.ViewModel.IsLoading || this.ViewModel.BatchParameterEditorViewModel.IsLoading)">
<LoadingComponent IsVisible="@(this.ViewModel.IsLoading)">
<div id="@WebAppConstantValues.ParameterEditorPage.QueryPageBodyName()" class="container-fluid">
<div class="row ">
<div class="col">
Expand Down Expand Up @@ -60,4 +60,4 @@ Copyright (c) 2024 Starion Group S.A.
<ParameterTable ViewModel="this.ViewModel.ParameterTableViewModel"/>
</div>
</div>
</LoadingComponent>
</LoadingComponent>
Original file line number Diff line number Diff line change
Expand Up @@ -172,23 +172,21 @@ protected override async Task OnDomainChanged()
protected override async Task OnThingChanged()
{
await base.OnThingChanged();
this.IsOwnedParameters = true;
this.ElementSelector.CurrentIteration = this.CurrentThing;
this.OptionSelector.CurrentIteration = this.CurrentThing;
this.ParameterTypeSelector.CurrentIteration = this.CurrentThing;
this.BatchParameterEditorViewModel.CurrentIteration = this.CurrentThing;
await this.InitializeTable();
}

/// <summary>
/// Initialize the <see cref="IParameterTableViewModel" />
/// </summary>
/// <returns>A <see cref="Task" /></returns>
private async Task InitializeTable()
{
this.IsLoading = true;
await Task.Delay(1);
this.ParameterTableViewModel.InitializeViewModel(this.CurrentThing, this.CurrentDomain, this.OptionSelector.SelectedOption);
if (!this.HasSetInitialValuesOnce)
{
this.IsLoading = true;

this.IsOwnedParameters = true;
this.ElementSelector.CurrentIteration = this.CurrentThing;
this.OptionSelector.CurrentIteration = this.CurrentThing;
this.ParameterTypeSelector.CurrentIteration = this.CurrentThing;
this.BatchParameterEditorViewModel.CurrentIteration = this.CurrentThing;
this.ParameterTableViewModel.InitializeViewModel(this.CurrentThing, this.CurrentDomain, this.OptionSelector.SelectedOption);

this.IsLoading = false;
}

this.IsLoading = false;
}

Expand Down

0 comments on commit de4cdfb

Please sign in to comment.