1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-27 05:49:07 +02:00
allow to pass popper.js configuration for tooltip/popover and dropdown
This commit is contained in:
Johann-S
2019-08-18 22:15:21 +03:00
committed by XhmikosR
parent 6381c63fb1
commit 7652d326e4
8 changed files with 113 additions and 40 deletions

View File

@@ -71,19 +71,21 @@ const AttachmentMap = {
}
const Default = {
offset : 0,
flip : true,
boundary : 'scrollParent',
reference : 'toggle',
display : 'dynamic'
offset : 0,
flip : true,
boundary : 'scrollParent',
reference : 'toggle',
display : 'dynamic',
popperConfig : null
}
const DefaultType = {
offset : '(number|string|function)',
flip : 'boolean',
boundary : '(string|element)',
reference : '(string|element)',
display : 'string'
offset : '(number|string|function)',
flip : 'boolean',
boundary : '(string|element)',
reference : '(string|element)',
display : 'string',
popperConfig : '(null|object)'
}
/**
@@ -359,7 +361,10 @@ class Dropdown {
}
}
return popperConfig
return {
...popperConfig,
...this._config.popperConfig
}
}
// Static