Skip to content

Commit 484767d

Browse files
littlecherroSanjeevani19
authored andcommitted
DHFPROD-9581: In Model, structured properties are not shown correctly
1 parent ad322b3 commit 484767d

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

marklogic-data-hub-central/ui/e2e/cypress/integration/modeling/writerScenario2.spec.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ describe("Entity Modeling: Writer Role", () => {
6262
propertyModal.newPropertyName("address");
6363
propertyModal.getSubmitButton().click();
6464
propertyTable.getMultipleIcon("address").should("exist");
65+
propertyTable.editProperty("address-address");
66+
cy.get("[title=\"Structured: Address\"]").should("exist");
67+
propertyModal.getCancelButton();
6568
});
6669
it("Add basic property to structured type", () => {
6770
propertyTable.getAddPropertyToStructureType("address").should("be.visible").click();

marklogic-data-hub-central/ui/src/components/modeling/property-modal/property-modal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,12 +955,12 @@ const PropertyModal: React.FC<Props> = (props) => {
955955
aria-label="type-dropdown"
956956
placeholder="Select the property type"
957957
options={dropdownOptions}
958-
displayRender={label => {
958+
displayRender={(label, selectedOption) => {
959959
if (label[label.length - 1]) {
960960
if (label[0] === "Related Entity") {
961961
return "Relationship: " + label[label.length - 1];
962962
} else if (label[0] === "Structured") {
963-
return "Structured: " + label[label.length - 1];
963+
return "Structured: " + selectedOption[selectedOption.length - 1].value;
964964
} else {
965965
return label[label.length - 1];
966966
}

marklogic-data-hub/src/test/ml-modules/root/test/suites/data-hub/5/data-services/graph/test-data/concepts/TestConcept.concept.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)