correct events

This commit is contained in:
Niels Lyngsø
2023-01-10 16:03:27 +01:00
parent 19d83cc730
commit ce8f692c2b
7 changed files with 7 additions and 7 deletions

View File

@@ -63,7 +63,7 @@ export class UmbInputPickerUserGroupElement extends UmbInputListBase {
selectionUpdated() {
this._observeUserGroups();
this.dispatchEvent(new CustomEvent('property-value-change', { bubbles: true, composed: true }));
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
}
private _renderUserGroupList() {

View File

@@ -63,7 +63,7 @@ export class UmbPickerUserElement extends UmbInputListBase {
selectionUpdated() {
this._observeUser();
this.dispatchEvent(new CustomEvent('property-value-change', { bubbles: true, composed: true }));
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
}
private _renderUserList() {

View File

@@ -58,7 +58,7 @@ export class UmbInputPickerSectionElement extends UmbInputListBase {
selectionUpdated() {
this._observeSections();
// TODO: Use proper event class:
this.dispatchEvent(new CustomEvent('property-value-change', { bubbles: true, composed: true }));
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
}
renderContent() {

View File

@@ -38,7 +38,7 @@ export class UmbPropertyActionClearElement extends UmbLitElement implements UmbP
private _clearValue() {
// TODO: how do we want to update the value? Testing an event based approach. We need to test an api based approach too.
//this.value = '';// This is though bad as it assumes we are dealing with a string. So wouldn't work as a generalized element.
//this.dispatchEvent(new CustomEvent('property-value-change', { bubbles: true, composed: true }));
//this.dispatchEvent(new CustomEvent('property-value-change'));
// Or you can do this:
this._propertyContext?.resetValue();// This resets value to what the property wants.
}

View File

@@ -90,7 +90,7 @@ export class UmbPropertyEditorUIContentPickerElement extends UmbLitElement {
private _setValue(newValue: Array<string>) {
this.value = newValue;
this._observePickedDocuments();
this.dispatchEvent(new CustomEvent('property-value-change', { bubbles: true, composed: true }));
this.dispatchEvent(new CustomEvent('property-value-change'));
}
private _renderItem(item: FolderTreeItem) {

View File

@@ -21,7 +21,7 @@ export class UmbPropertyEditorUINumberElement extends LitElement {
private onInput(e: InputEvent) {
this.value = (e.target as HTMLInputElement).value;
this.dispatchEvent(new CustomEvent('property-value-change', { bubbles: true, composed: true }));
this.dispatchEvent(new CustomEvent('property-value-change'));
}
render() {

View File

@@ -21,7 +21,7 @@ export class UmbPropertyEditorUITextBoxElement extends LitElement {
private onInput(e: InputEvent) {
this.value = (e.target as HTMLInputElement).value;
this.dispatchEvent(new CustomEvent('property-value-change', { bubbles: true, composed: true }));
this.dispatchEvent(new CustomEvent('property-value-change'));
}
render() {