fix(components): popper content fallback placements (#5119)

- Fix popper content don't fallback to correct placement
This commit is contained in:
jeremywu 2022-01-04 11:00:00 +08:00 committed by GitHub
parent a6ef40d1de
commit 11752052dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ export const unwrapMeasurableEl = (
}
function genModifiers(options: UsePopperCoreConfigProps) {
const { offset, gpuAcceleration } = options
const { offset, gpuAcceleration, fallbackPlacements } = options
return [
{
name: 'offset',
@ -62,7 +62,7 @@ function genModifiers(options: UsePopperCoreConfigProps) {
name: 'flip',
options: {
padding: 5,
fallbackPlacements: [],
fallbackPlacements: fallbackPlacements ?? [],
},
},
{