1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-27 07:14:36 +02:00

Extract static DATA_KEY & EVENT_KEY to base-component (#33635)

* Force each plugin that extends base-components to implement a static method `NAME()`
* Remove redundant `NAME` argument from 'Utils.defineJQueryPlugin' & fix test
This commit is contained in:
GeoSot
2021-05-11 10:49:30 +03:00
committed by GitHub
parent 7647b8fe5b
commit 9fe36edf68
16 changed files with 167 additions and 53 deletions

View File

@@ -87,8 +87,8 @@ class ScrollSpy extends BaseComponent {
return Default
}
static get DATA_KEY() {
return DATA_KEY
static get NAME() {
return NAME
}
// Public
@@ -303,6 +303,6 @@ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
* add .ScrollSpy to jQuery only if jQuery is present
*/
defineJQueryPlugin(NAME, ScrollSpy)
defineJQueryPlugin(ScrollSpy)
export default ScrollSpy