Skip to content

Commit eeb5070

Browse files
style(Dynamic Component): Remove hidden component's div from DOM
1 parent ac9619c commit eeb5070

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/assets/wise5/vle/node/node.component.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
</div>
1010
}
1111
@for (component of components; track component) {
12-
<div
13-
id="component_{{ component.id }}"
14-
class="component max-lg:!w-full"
15-
[ngStyle]="{ width: component.componentWidth ? component.componentWidth + '%' : '100%' }"
16-
>
17-
@if (componentToVisible[component.id]) {
12+
@if (componentToVisible[component.id]) {
13+
<div
14+
id="component_{{ component.id }}"
15+
class="component max-lg:!w-full"
16+
[ngStyle]="{ width: component.componentWidth ? component.componentWidth + '%' : '100%' }"
17+
>
1818
<component
1919
[nodeId]="node.id"
2020
[componentId]="component.id"
2121
[componentState]="getComponentStateByComponentId(component.id)"
2222
[workgroupId]="workgroupId"
2323
(saveComponentStateEvent)="saveComponentState($event)"
2424
/>
25-
}
26-
</div>
25+
</div>
26+
}
2727
}
2828
<div class="node-content__actions flex items-center gap-3">
2929
@if (node.showSaveButton) {

0 commit comments

Comments
 (0)