Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(property-form): App changes "salsah-gui:List" to "salsah-gui:Pulldown" (DEV-1089) #783

Merged
merged 2 commits into from Jul 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/app/project/ontology/property-form/property-form.component.ts
Expand Up @@ -455,7 +455,12 @@ export class PropertyFormComponent implements OnInit {
(propertyCommentResponse: ResourcePropertyDefinitionWithAllLanguages) => {
this.lastModificationDate = propertyCommentResponse.lastModificationDate;

if (!this.unsupportedPropertyType) {
// if property type is supported and is of type TextValue and the guiElement is different from its initial value, call replaceGuiElement() to update the guiElement
// this only works for the TextValue object type currently
// https://docs.dasch.swiss/latest/DSP-API/03-apis/api-v2/ontology-information/#changing-the-gui-element-and-gui-attributes-of-a-property
if (!this.unsupportedPropertyType &&
this.propertyInfo.propDef.objectType === Constants.TextValue &&
this.propertyInfo.propDef.guiElement !== this.propertyForm.controls['propType'].value.guiEle) {
this.replaceGuiElement();
} else {
this.loading = false;
Expand All @@ -478,7 +483,12 @@ export class PropertyFormComponent implements OnInit {
(deleteCommentResponse: ResourcePropertyDefinitionWithAllLanguages) => {
this.lastModificationDate = deleteCommentResponse.lastModificationDate;

if (!this.unsupportedPropertyType) {
// if property type is supported and is of type TextValue and the guiElement is different from its initial value, call replaceGuiElement() to update the guiElement
// this only works for the TextValue object type currently
// https://docs.dasch.swiss/latest/DSP-API/03-apis/api-v2/ontology-information/#changing-the-gui-element-and-gui-attributes-of-a-property
if (!this.unsupportedPropertyType &&
this.propertyInfo.propDef.objectType === Constants.TextValue &&
this.propertyInfo.propDef.guiElement !== this.propertyForm.controls['propType'].value.guiEle) {
this.replaceGuiElement();
} else {
this.loading = false;
Expand Down