Skip to content

Popover directive - content as a method does not receive element as argument #4331

@d4mn

Description

@d4mn

Describe the bug

In documentation it says that a directive as a function should receive argument with reference to element: "A function reference to generate the content of the popover (receives one argument which is a reference to the DOM element triggering the popover)"
But none is received i got undefined

Steps to reproduce the bug

<b-img :key="index" v-b-popover.hover="zoomImage" v-bind="thumbProps" left :src="item" alt="Image 1"></b-img>

methods:{ zoomImage(el) { console.log(el); return '<img src="'+el.src+'">'; } }

Expected behavior

Should receive reference to get content from hovered element

Versions

Libraries:

  • BootstrapVue: 2.0.4
  • Bootstrap: 4.3.1
  • Vue: 2.6.10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions