Skip to content

Commit 7d4081c

Browse files
[6.x] Avoid animation when loading Bard field with collapse: true (#13805)
1 parent e332550 commit 7d4081c

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

resources/js/components/fieldtypes/bard/BardFieldtype.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,7 @@ export default {
391391
this.json = this.editor.getJSON().content;
392392
this.html = this.editor.getHTML();
393393
394-
this.$nextTick(() => {
395-
this.mounted = true;
396-
if (this.config.collapse) this.collapseAll();
397-
});
394+
this.$nextTick(() => this.mounted = true);
398395
399396
this.pageHeader = document.querySelector('.global-header');
400397

resources/js/components/fieldtypes/replicator/Replicator.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,6 @@ export default {
351351
},
352352
},
353353
354-
mounted() {
355-
if (this.config.collapse) this.collapseAll();
356-
},
357-
358354
watch: {
359355
focused(focused, oldFocused) {
360356
if (focused === oldFocused) return;

src/Fieldtypes/Bard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ public function preload()
637637

638638
$data = [
639639
'existing' => $existing,
640-
'collapsed' => [],
640+
'collapsed' => $this->config('collapse') ? array_keys($existing) : [],
641641
'previews' => $previews,
642642
'__collaboration' => ['existing'],
643643
'linkCollections' => $linkCollections,

src/Fieldtypes/Replicator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public function preload()
230230

231231
return [
232232
'existing' => $existing,
233-
'collapsed' => [],
233+
'collapsed' => $this->config('collapse') ? array_keys($existing) : [],
234234
];
235235
}
236236

0 commit comments

Comments
 (0)