mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-27 05:49:07 +02:00
Add a template factory helper to handle all template cases (#34519)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -78,12 +78,14 @@ class Popover extends Tooltip {
|
||||
return this.getTitle() || this._getContent()
|
||||
}
|
||||
|
||||
setContent(tip) {
|
||||
this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE)
|
||||
this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT)
|
||||
// Private
|
||||
_getContentForTemplate() {
|
||||
return {
|
||||
[SELECTOR_TITLE]: this.getTitle(),
|
||||
[SELECTOR_CONTENT]: this._getContent()
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
_getContent() {
|
||||
return this._resolvePossibleFunction(this._config.content)
|
||||
}
|
||||
|
Reference in New Issue
Block a user