Skip to content
Snippets Groups Projects
Verified Commit 60718acb authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: send an event after succesfully import

parent 07b99970
No related branches found
No related tags found
No related merge requests found
...@@ -25,10 +25,9 @@ import { ...@@ -25,10 +25,9 @@ import {
assembleMethodSymbol, assembleMethodSymbol,
CustomElement, CustomElement,
getSlottedElements, getSlottedElements,
initMethodSymbol,
registerCustomElement, registerCustomElement,
} from "../../dom/customelement.mjs"; } from "../../dom/customelement.mjs";
import { findTargetElementFromEvent } from "../../dom/events.mjs"; import {findTargetElementFromEvent, fireEvent} from "../../dom/events.mjs";
import { findElementWithSelectorUpwards } from "../../dom/util.mjs"; import { findElementWithSelectorUpwards } from "../../dom/util.mjs";
import { Formatter } from "../../text/formatter.mjs"; import { Formatter } from "../../text/formatter.mjs";
import { isFunction, isString } from "../../types/is.mjs"; import { isFunction, isString } from "../../types/is.mjs";
...@@ -81,7 +80,7 @@ const firstRunDoneSymbol = Symbol("firstRunDone"); ...@@ -81,7 +80,7 @@ const firstRunDoneSymbol = Symbol("firstRunDone");
* *
* @since 1.0.0 * @since 1.0.0
* @summary A TreeMenu control * @summary A TreeMenu control
* @fires monster-fetched * @fires entries-imported
*/ */
class TreeMenu extends CustomElement { class TreeMenu extends CustomElement {
/** /**
...@@ -120,13 +119,13 @@ class TreeMenu extends CustomElement { ...@@ -120,13 +119,13 @@ class TreeMenu extends CustomElement {
* @property {string} templates.main Main template * @property {string} templates.main Main template
* @property {Datasource} datasource data source * @property {Datasource} datasource data source
* @property {Object} mapping * @property {Object} mapping
* @property {String} mapping.selector=* Path to select the appropriate entries * @property {String} mapping.selector Path to select the appropriate entries
* @property {String} mapping.labelTemplate="" template with the label placeholders in the form ${name}, where name is the key * @property {String} mapping.labelTemplate template with the label placeholders in the form ${name}, where name is the key
* @property {String} mapping.keyTemplate="" template with the key placeholders in the form ${name}, where name is the key * @property {String} mapping.keyTemplate template with the key placeholders in the form ${name}, where name is the key
* @property {String} mapping.rootReferences=['0', undefined, null] * @property {String} mapping.rootReferences the root references
* @property {String} mapping.idTemplate=id * @property {String} mapping.idTemplate template with the id placeholders in the form ${name}, where name is the key
* @property {String} mapping.parentKey=parent * @property {String} mapping.parentKey the parent key
* @property {String} mapping.selection * @property {String} mapping.selection the selection
*/ */
get defaults() { get defaults() {
return Object.assign({}, super.defaults, { return Object.assign({}, super.defaults, {
...@@ -513,6 +512,7 @@ function importEntries() { ...@@ -513,6 +512,7 @@ function importEntries() {
queueMicrotask(() => { queueMicrotask(() => {
this.setOption("entries", options); this.setOption("entries", options);
fireEvent(this, "entries-imported");
}); });
return this; return this;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment