This commit is contained in:
Niels Lyngsø
2023-01-09 16:09:19 +01:00
parent b0ac74e1a5
commit 259e2a534a
2 changed files with 3 additions and 3 deletions

View File

@@ -96,7 +96,7 @@ export class UmbWorkspacePropertyContext<ValueType = unknown> {
}
public resetValue() {
this.setValue(null);
this.setValue(null);// TODO: Consider if this can be configured/provided from Property Editor or DataType Configuration or even locally specified in DocumentType.
}
// TODO: how can we make sure to call this.

View File

@@ -37,10 +37,10 @@ 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.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('change', { bubbles: true, composed: true }));
// Or you can do this:
this._propertyContext?.resetValue('');
this._propertyContext?.resetValue();// This resets value to what the property wants.
}
render() {