Skip to content

Commit 8481659

Browse files
perf: Only render block toolbar when needed
1 parent 54c02a8 commit 8481659

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

panel/src/components/Forms/Blocks/Block.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</div>
3737

3838
<k-block-options
39-
v-if="!isDisabled"
39+
v-if="isLastSelected && !isDisabled"
4040
ref="options"
4141
v-bind="{
4242
isBatched,
@@ -406,15 +406,11 @@ export default {
406406
}
407407
408408
.k-block-container .k-block-options {
409-
display: none;
410409
position: absolute;
411410
top: 0;
412411
inset-inline-end: var(--spacing-3);
413412
margin-top: calc(-1.75rem + 2px);
414413
}
415-
.k-block-container[data-last-selected="true"] > .k-block-options {
416-
display: flex;
417-
}
418414
.k-block-container[data-hidden="true"] .k-block {
419415
opacity: 0.25;
420416
}

0 commit comments

Comments
 (0)