We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 321ac4f commit d1763eeCopy full SHA for d1763ee
addons/html_builder/static/src/plugins/carousel_option_plugin.js
@@ -51,6 +51,17 @@ export class CarouselOptionPlugin extends Plugin {
51
on_snippet_dropped_handlers: this.onSnippetDropped.bind(this),
52
normalize_handlers: this.normalize.bind(this),
53
on_reorder_items_handlers: this.reorderCarouselItems.bind(this),
54
+ before_save_handlers: () => {
55
+ const proms = [];
56
+ for (const carouselEl of this.editable.querySelectorAll(".carousel")) {
57
+ const firstItem = carouselEl.querySelector(".carousel-item");
58
+ if (firstItem.classList.contains("active")) {
59
+ continue;
60
+ }
61
+ proms.push(this.slide(carouselEl, 0));
62
63
+ return Promise.all(proms);
64
+ },
65
};
66
67
getActions() {
0 commit comments