Created by: rohit2sharma95
Closes #32648 (closed)
fallbackPlacements
option from the dropdown:
Why to remove - This restricts the flipping behavior of the dropdown to four directions only and it does not let the dropdown flip in the exact opposite side of the current placement.
- I believe that there should be an option in the dropdown's configuration to override the customized (by bootstrap) configuration of the popper. It is not available for
fallbackPlacements
right now.
fallbackPlacements
option in Tooltip/Popover:
Why to keep Because it provides better placements to Tooltip/Popover IMO (Since there is no official special handing for the placement of Tooltip/Popover on the edges, like- dropstart
and dropend
for dropdowns). Popper's default value for fallbackPlacements
is [oppositePlacement] it means:
If the popper has placement set to bottom, but there isn't enough space to position the popper in that direction, it will change the popper placement to top (opposite side). As soon as enough space is detected on the bottom, the placement will be reverted to the bottom side. But if the top placement doesn't fit (while Popper trying to flip the element), it reverts back to the original placement (to the bottom side even if there was not enough space in the viewport that made Popper try to flip the element). And this behavior causes the issue: #32384 (closed).
More in the description of #32437. So its better to have more fallback placements by default for Tooltip/Popover.
And the flip modifier can be added with fallbackPlacements
by the popperConfig
option in case the same issue like #32384 (closed) is caused with dropdowns as well (Which is rare in case of dropdowns IMO).