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

Fix missing data-x-out-of-boundaries attribute #45

Merged
merged 1 commit into from
Sep 22, 2017

Conversation

kylegach
Copy link
Contributor

@kylegach kylegach commented Aug 1, 2017

Current behavior

No support for https://popper.js.org/popper-documentation.html#modifiers..hide.

Expected behavior

Full support for modifiers.hide, specifically that the data-x-out-of-boundaries attribute is passed along.

Changes

Passes along the data-x-out-of-boundaries attribute in a similar manner to data-placement.

Why

We needed this in our app. More importantly, we saw no reason a wrapper around Popper shouldn’t support this.

How this has been tested

Confirmed build still works. Confirmed expected example behavior when running dev after modifying the Popper config like so:

const modifiers = {
  customStyle: {
    // ...unchanged
  },
  preventOverflow: {
    boundariesElement: 'viewport',
  },
  hide: {
    enabled: true,
  },
}

@kylegach kylegach force-pushed the master branch 2 times, most recently from c859866 to cc7badc Compare August 4, 2017 14:52
@kylegach
Copy link
Contributor Author

Hi, @souporserious. Have you had a chance to consider this? We still need it within our app, and would love to not have to rely on my fork.

@FezVrasta
Copy link
Member

You may create a custom modifier to add this missing piece of logic. It's fairly easy

@FezVrasta
Copy link
Member

Or directly use the data object to obtain this info

@souporserious
Copy link
Collaborator

Sorry, I've been super busy lately and just getting around to this. Looks good! Thanks!

@souporserious souporserious merged commit 81ff21e into floating-ui:master Sep 22, 2017
@kylegach
Copy link
Contributor Author

Thanks, Travis!

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

Successfully merging this pull request may close these issues.

3 participants