When I click to edit I call a component for the editing so in the component I cannot click anything and hast background black that its oke, but I want for each ID what I select to edit to be active or just to have background white or z-index.
This is my HTML
<div class="name-block" [ngClass]="'name-block-width-' + valueItem.level"
[ngClass]="{active: activeSelected === valueItem.id, 'name-block': true}" (click)="toggleExpand()">
</div>
This is the css
.name-block {
@extend %common-block;
@include center(false, true);
@include justify-content(space-between);
margin-left: 1px;
padding-left: 10px;
&.active {
z-index: 950;
}
div.businessId {
@extend %flexbox;
@include center(false, true);
border-left: solid thin $border-color;
padding: 0 5px;
height: 100%;
}
}
@for $i from 1 through 7 {
.name-block-width-#{$i} {
width: 500px - (($i - 1) * 50px);
}
}
And this is the TS when I try to edit
edit(editOptions: EditViOptions) {
this.showChild = !this.showChild;
if (editOptions.valueItem || editOptions.appendToParentId) {
this.dataToPass = editOptions;
this.activeSelected = editOptions.valueItem.id;
} else {
this.activeSelected = null;
}
}