2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03: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
+17
View File
@@ -1266,4 +1266,21 @@ $(function () {
assert.strictEqual(tooltip.config.sanitize, true)
})
QUnit.test('should allow to pass config to popper.js with `popperConfig`', function (assert) {
assert.expect(1)
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
.appendTo('#qunit-fixture')
.bootstrapTooltip({
popperConfig: {
placement: 'left'
}
})
var tooltip = $trigger.data('bs.tooltip')
var popperConfig = tooltip._getPopperConfig('top')
assert.strictEqual(popperConfig.placement, 'left')
})
})