Extend Foundry's MultiSelectElement so that I can provide a label to it
This commit is contained in:
parent
5e9b91b199
commit
d858aa5b66
5 changed files with 53 additions and 0 deletions
19
module/Apps/elements/_index.mjs
Normal file
19
module/Apps/elements/_index.mjs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { CustomMultiSelect } from "./CustomMultiSelect.mjs";
|
||||
import { Logger } from "../../utils/Logger.mjs";
|
||||
|
||||
const components = [
|
||||
CustomMultiSelect,
|
||||
];
|
||||
|
||||
export function registerCustomComponents() {
|
||||
(CONFIG.CACHE ??= {}).componentListeners ??= [];
|
||||
for (const component of components) {
|
||||
if (!window.customElements.get(component.tagName)) {
|
||||
Logger.debug(`Registering component "${component.tagName}"`);
|
||||
window.customElements.define(
|
||||
component.tagName,
|
||||
component,
|
||||
);
|
||||
};
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue