2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Add a template factory helper to handle all template cases (#34519)

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
GeoSot
2021-11-25 19:14:02 +02:00
committed by GitHub
parent fa33e83f25
commit 94a596fbcb
10 changed files with 606 additions and 131 deletions
+6 -4
View File
@@ -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)
}