Created by: rohit2sharma95
The default value for fallbackPlacements has been changed already in #32405 and here are the remaining things to do.
What this PR does:
- Remove
nullfromfallbackPlacementstypes - Change the default value for
fallbackPlacements - Update docs for the tooltip/popover
Why to remove null from fallbackPlacements types and keep array:
- The default value was previously (in v4)
'flip'that can be achieved by passing the single value in the array, like —[oppositePlacement]. Keepingnullalso sets thefallbackPlacementsto[oppositePlacement](Default value in Popper) - It's better to have clockwise (
['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 (closed) 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:
If the fallback placement doesn't fit, it reverts back to the original placement.
| Not enough space on right (That's why did not flip) | Enough space on right (Flipped) | After setting clockwise fallback placements in #32405 |
|---|---|---|
![]() |
![]() |
![]() |
All SS are from v5.0.0-beta1
This PR probably completes the third todo of #32354 (closed): Update docs after #32405
Preview: https://deploy-preview-32437--twbs-bootstrap.netlify.app/docs/5.0/components/popovers/#example


