minor optimizations
This commit is contained in:
@@ -91,8 +91,8 @@ export class UmbContentTypeDesignEditorPropertiesElement extends UmbLitElement {
|
||||
return this._containerId;
|
||||
}
|
||||
public set containerId(value: string | null | undefined) {
|
||||
if (value === this._containerId) return;
|
||||
const oldValue = this._containerId;
|
||||
if (value === oldValue) return;
|
||||
this._containerId = value;
|
||||
this.#propertyStructureHelper.setContainerId(value);
|
||||
this.#addPropertyModal.setUniquePathValue('container-id', value === null ? 'root' : value);
|
||||
|
||||
@@ -23,8 +23,8 @@ import {
|
||||
export class UmbContentTypeDesignEditorPropertyElement extends UmbLitElement {
|
||||
//
|
||||
#dataTypeDetailRepository = new UmbDataTypeDetailRepository(this);
|
||||
|
||||
#settingsModal;
|
||||
#dataTypeUnique?: string;
|
||||
|
||||
@property({ attribute: false })
|
||||
public set propertyStructureHelper(value: UmbContentTypePropertyStructureHelper<UmbContentTypeModel> | undefined) {
|
||||
@@ -49,6 +49,7 @@ export class UmbContentTypeDesignEditorPropertyElement extends UmbLitElement {
|
||||
}
|
||||
public set property(value: UmbPropertyTypeModel | UmbPropertyTypeScaffoldModel | undefined) {
|
||||
const oldValue = this._property;
|
||||
if (value === oldValue) return;
|
||||
this._property = value;
|
||||
this.#checkInherited();
|
||||
this.#settingsModal.setUniquePathValue('propertyId', value?.id);
|
||||
@@ -141,9 +142,15 @@ export class UmbContentTypeDesignEditorPropertyElement extends UmbLitElement {
|
||||
this._aliasLocked = !this._aliasLocked;
|
||||
}
|
||||
|
||||
async #setDataType(dataTypeId: string | undefined) {
|
||||
if (!dataTypeId) return;
|
||||
this.#dataTypeDetailRepository.requestByUnique(dataTypeId).then((x) => (this._dataTypeName = x?.data?.name));
|
||||
async #setDataType(dataTypeUnique: string | undefined) {
|
||||
if (!dataTypeUnique) {
|
||||
this._dataTypeName = undefined;
|
||||
this.#dataTypeUnique = undefined;
|
||||
return;
|
||||
}
|
||||
if (dataTypeUnique === this.#dataTypeUnique) return;
|
||||
this.#dataTypeUnique = dataTypeUnique;
|
||||
this.#dataTypeDetailRepository.requestByUnique(dataTypeUnique).then((x) => (this._dataTypeName = x?.data?.name));
|
||||
}
|
||||
|
||||
async #requestRemove(e: Event) {
|
||||
|
||||
Reference in New Issue
Block a user