-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip/popover - change the default value for fallbackPlacements
#32437
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XhmikosR
reviewed
Dec 11, 2020
patrickhlauke
previously requested changes
Dec 14, 2020
The default value for fallbackPlacements is [oppositePlacement] in Popper (That does not flip the element if there is not enough space for placing)
rohit2sharma95
force-pushed
the
rohit/main/fallbackPlacements-option
branch
from
December 14, 2020 12:27
7296378
to
d08aec3
Compare
XhmikosR
changed the title
Tooltip/popover — change the default value for fallbackPlacements
Tooltip/popover - change the default value for Dec 14, 2020
fallbackPlacements
Should we mention this in migration notes @rohit2sharma95 ? |
Mentioning it would be better because now the default fallback placement has been changed. |
rohit2sharma95
force-pushed
the
rohit/main/fallbackPlacements-option
branch
from
December 14, 2020 13:05
620f982
to
87b0286
Compare
XhmikosR
approved these changes
Dec 14, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The default value for
fallbackPlacements
has been changed already in #32405 and here are the remaining things to do.What this PR does:
null
fromfallbackPlacements
typesfallbackPlacements
Why to remove
null
fromfallbackPlacements
types and keep array:'flip'
that can be achieved by passing the single value in the array, like —[oppositePlacement]
. Keepingnull
also sets thefallbackPlacements
to[oppositePlacement]
(Default value in Popper)['top', 'right', 'bottom', 'left']
) fallback options so that tooltip/popover can be placed to another side even if the opposite placement doesn't fit.BTW #32384 is caused because the default value for
fallbackPlacements
is[oppositePlacement]
in Popper and if you check the issue on a bit larger screen, it is not reproduced.As per Popper's documentation:
All SS are from v5.0.0-beta1
This PR probably completes the third todo of #32354: Update docs after #32405
Preview: https://deploy-preview-32437--twbs-bootstrap.netlify.app/docs/5.0/components/popovers/#example