Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Getting alert `preventOverflow modifier is required by hide` #105

Closed
ciaoben opened this issue Sep 28, 2017 · 5 comments
Closed

Getting alert `preventOverflow modifier is required by hide` #105

ciaoben opened this issue Sep 28, 2017 · 5 comments

Comments

@ciaoben
Copy link

ciaoben commented Sep 28, 2017

I created a little React component that wraps tippyjs, and when I render long lists of elements and scroll down the tooltips attached to the elements that are not initially in the viewport compare far away from their elements.
Searching through the issues I found this solution:

 const tippyConf = {
      animation: 'shift',
      size: 'regular',
      theme: 'qbox',
      html: this.props.title && '#with-title',
      // duration: 1000,
      arrow: true,
      popperOptions: {
        modifiers: {
          preventOverflow: {
            enabled: false
          }
        }
      }
    }

const tippy = Tippy(`#${this.state.randomId}`, this.state.tippyConf)

Now the positioning seems to work correctly but anytime I trigger the show of a tooltip get this in the console.

`preventOverflow` modifier is required by `hide` modifier in order to work, be sure to include it before `hide`!

If I change the config to this:

modifiers: {
          preventOverflow: {
            enabled: false
          },
          hide: {
            enabled: false
          }
        }

The warns disappear.

I would like know if I am breaking something using tippy like this

@atomiks
Copy link
Owner

atomiks commented Sep 28, 2017

I encountered that as well and I believe it's something required by Popper, but I haven't looked into it deeply.

@IAkumaI
Copy link

IAkumaI commented Oct 7, 2017

Same "problem". Tonns o warnings with this message. Thanks for solving.

@atomiks atomiks closed this as completed Jan 3, 2018
@abriginets
Copy link

Will this issue be fixed? This is really annoying when you trying to debug something but recieving tonns of warnings in console.

@atomiks
Copy link
Owner

atomiks commented Feb 5, 2018

I don't think there's a "fix", you just need to disable the hide modifier as well.

@abriginets
Copy link

abriginets commented Feb 5, 2018

@atomiks oh, thanks. I looked into a documentation and saw that there's modifier hide: { enabled: false } so I copied it to my code and Popper now finished spamming to my console. The reason is that I moved to v2 from v1 where's hide modifier was not specified in docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants