Fix popper modifier validation error (#8382)

This commit is contained in:
Nicola Krumschmidt
2021-09-28 16:04:22 +02:00
committed by GitHub
parent a806dc373a
commit f555eb80db
2 changed files with 8 additions and 9 deletions

View File

@@ -67,7 +67,7 @@ export function usePopper(
}
function getModifiers(callback: (value?: unknown) => void = () => undefined) {
const modifiers: Partial<Modifier<string, any>>[] = [
const modifiers: Modifier<string, any>[] = [
popperOffsets,
{
...offset,
@@ -81,12 +81,6 @@ export function usePopper(
padding: 8,
},
},
{
name: 'arrow',
options: {
padding: 6,
},
},
computeStyles,
flip,
eventListeners,
@@ -111,7 +105,12 @@ export function usePopper(
];
if (options.value.arrow === true) {
modifiers.push(arrow);
modifiers.push({
...arrow,
options: {
padding: 6,
},
});
}
if (options.value.attached === true) {

View File

@@ -135,7 +135,7 @@ export default defineComponent({
reference,
popper,
computed(() => ({
placement: props.placement as Placement,
placement: props.placement,
attached: props.attached,
arrow: props.showArrow,
}))