Element: [Feature Request] There is a new option in popper.js

Created on 25 Dec 2017  ·  4Comments  ·  Source: ElemeFE/element

Existing Component

Yes

Component Name

el-popover

Description

Hoping el-popover add positionFixed property

see https://github.com/FezVrasta/popper.js/pull/487#issuecomment-345430318

Most helpful comment

Sorry, Poor English

Need el-popover do not append to body. In my case el-popover must be component direct children instead of body.

when append-to-body set to false the el-popover It doesn't append to body, but el-popover position is absolute. Here needs position is fixed because it's parent element style overflow: hidden

<div class="_com-grids-selector-wrapper">
    <el-popover ref="popoverGridsSelector"
      @show="$emit('show')"
      @hide="$emit('hide')"
      placement="top"
      trigger="hover"
      v-model="visibile"
      :open-delay="300"
      :offset="0"
      :append-to-body="false"
      :popper-options="{
        boundariesElement: 'body',
        gpuAcceleration: true,
        positionFixed: true,
        preventOverflow: true,
      }">
      <div class="_com-grids-selector">
     .....

All 4 comments

What is the use case of this property?

Sorry, Poor English

Need el-popover do not append to body. In my case el-popover must be component direct children instead of body.

when append-to-body set to false the el-popover It doesn't append to body, but el-popover position is absolute. Here needs position is fixed because it's parent element style overflow: hidden

<div class="_com-grids-selector-wrapper">
    <el-popover ref="popoverGridsSelector"
      @show="$emit('show')"
      @hide="$emit('hide')"
      placement="top"
      trigger="hover"
      v-model="visibile"
      :open-delay="300"
      :offset="0"
      :append-to-body="false"
      :popper-options="{
        boundariesElement: 'body',
        gpuAcceleration: true,
        positionFixed: true,
        preventOverflow: true,
      }">
      <div class="_com-grids-selector">
     .....

Sorry, Poor English

Need el-popover do not append to body. In my case el-popover must be component direct children instead of body.

when append-to-body set to false the el-popover It doesn't append to body, but el-popover position is absolute. Here needs position is fixed because it's parent element style overflow: hidden

<div class="_com-grids-selector-wrapper">
    <el-popover ref="popoverGridsSelector"
      @show="$emit('show')"
      @hide="$emit('hide')"
      placement="top"
      trigger="hover"
      v-model="visibile"
      :open-delay="300"
      :offset="0"
      :append-to-body="false"
      :popper-options="{
        boundariesElement: 'body',
        gpuAcceleration: true,
        positionFixed: true,
        preventOverflow: true,
      }">
      <div class="_com-grids-selector">
     .....

Have you solved it?

Have you solved it?positionFixed: true

Was this page helpful?
0 / 5 - 0 ratings