app/assets/js/base/alpine/directives/dropdown.js in coveragebook_components-0.18.0 vs app/assets/js/base/alpine/directives/dropdown.js in coveragebook_components-0.18.7
- old
+ new
@@ -14,11 +14,11 @@
const data = getData(el);
const settings = buildConfig(modifiers);
const result = expression ? evaluate(expression) : {};
const directiveConfig = isObject(result) ? result : {};
- let { triggerTarget, contentTarget, anchorTarget, ...config } =
+ let { triggerTarget, contentTarget, anchorTarget, flip, ...config } =
directiveConfig;
contentTarget =
contentTarget || el.querySelector("[x-dropdown\\:content]");
const content = isNode(contentTarget)
@@ -59,9 +59,12 @@
offset: [0, 0],
trigger: "click",
interactive: true,
animation: false,
maxWidth: 380,
+ popperOptions: {
+ modifiers: [{ name: "flip", enabled: flip !== false }],
+ },
triggerTarget,
content,
onShow: (...args) => {