floating-vue
floating-vue copied to clipboard
Default placement not working
I have the following config:
import VueTooltip from 'v-tooltip'
Vue.use(VueTooltip, {
defaultPlacement: 'bottom',
defaultClass: '',
defaultTemplate: `
<div class="Tooltip" role="tooltip">
<div class="Tooltip-arrow"></div>
<div class="Tooltip-body"></div>
</div>
`,
defaultArrowSelector: '.Tooltip-arrow',
defaultInnerSelector: '.Tooltip-body',
defaultTargetClass: 'has-tooltip',
defaultLoadingClass: 'is-loading',
defaultLoadingContent: '<spinner/>',
});
And HTML:
<i class="Icon" v-if="isFoo" v-tooltip="'My tooltip'">warning</i>
This fails to produce a tooltip.
I have to explicitly specify the placement in order for it to work:
<i class="Icon" v-if="isFoo" v-tooltip.bottom="'My tooltip'">warning</i>
Am I doing something wrong or is this a bug? I would expect that it would honour the configured default placement if I don't specify it.
Please provide a runnable minimal reproduction, thanks! :pray:
Hi @adamreisnz
Did you find a workaround ?
In my case, even the v-tooltip.bottom =
solution doesn't work.
x-placement is always equal to "top"
No I did not. I provided a reproduction up in my original post.