Skip to content

Commit 39365dc

Browse files
committed
feat: 增加 shownCallback 回调
1 parent 33a6a01 commit 39365dc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/BootstrapBlazor/wwwroot/modules/base-popover.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ const Popover = {
1515
return isDisabled(el) || isDisabled(el.parentNode) || isDisabled(el.querySelector('.form-control'))
1616
},
1717
initCallback: null,
18-
hideCallback: null
18+
hideCallback: null,
19+
shownCallback: null
1920
},
2021
...(config || {})
2122
}
@@ -105,7 +106,11 @@ const Popover = {
105106
popover.hasDisplayNone = true;
106107
content.classList.remove("d-none")
107108
}
108-
body.append(content)
109+
body.append(content);
110+
111+
if (popover.shownCallback != null) {
112+
popover.shownCallback();
113+
}
109114
}
110115
}
111116

0 commit comments

Comments
 (0)