review feedback

This commit is contained in:
Nathan Woulfe
2023-05-17 13:30:15 +10:00
parent ecba080413
commit 13d006efe7
2 changed files with 3 additions and 8 deletions

View File

@@ -9,12 +9,8 @@ export class UmbDataTypePropertyCollection extends Array<DataTypePropertyPresent
super(...args);
}
private _getByAlias(alias: string) {
return this.find((x) => x.alias === alias);
}
getValueByAlias<T>(alias: string): T | undefined {
const property = this._getByAlias(alias);
const property = this.getByAlias(alias);
if (property?.value === undefined || property?.value === null) {
return;
@@ -24,7 +20,6 @@ export class UmbDataTypePropertyCollection extends Array<DataTypePropertyPresent
}
getByAlias(alias: string): DataTypePropertyPresentationModel | undefined {
const property = this._getByAlias(alias);
return property;
return this.find((x) => x.alias === alias);
}
}

View File

@@ -91,7 +91,7 @@ export class UmbWorkspacePropertyElement extends UmbLitElement {
* @default ''
*/
@property({ type: Object, attribute: false })
public set config(value: UmbDataTypePropertyCollection) {
public set config(value: DataTypePropertyPresentationModel[]) {
this._propertyContext.setConfig(value);
}