Element: [Bug Report] Popover can not pop up the last in table

Created on 20 Apr 2018  ·  3Comments  ·  Source: ElemeFE/element

Element UI version

2.3.4

OS/Browsers version

MAC/CHROME

Vue version

2.5.10

Reproduction Link

https://jsfiddle.net/6hr287ot/1/

Steps to reproduce

  1. Add the el-table
  2. Add the el-button
  3. Add the popover in el-button

What is Expected?

The last item in the table should pop up the popover.

What is actually happening?

The last item in the table not pop up the popover.

Most helpful comment

This is related to Vue ref mechanism. Basically you should avoid setting multiple elements with the same ref (in your case, all <el-popper> has the same ref of 'popover') in a non-v-for structure.

Use named slot instead: https://jsfiddle.net/leopoldthecuber/6hr287ot/5/

All 3 comments

Same issue.
The event ['input', 'hide'] of <el-popover> not triggered on the last item, you can check that via the Vue dev tool.

This is related to Vue ref mechanism. Basically you should avoid setting multiple elements with the same ref (in your case, all <el-popper> has the same ref of 'popover') in a non-v-for structure.

Use named slot instead: https://jsfiddle.net/leopoldthecuber/6hr287ot/5/

@Leopoldthecoder in your example, how to close the popover when click cancel button or ok button.

Was this page helpful?
0 / 5 - 0 ratings