Replies: 1 comment 4 replies
-
|
Hi @XinJack, thanks for reporting this. I created an issue for it: iTwin/presentation#1156. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In the onPropertyUpdated callback of property-grid-react, I am trying to use the IPresentationPropertyDataProvider.getFieldByPropertyDescription(PropertyRecord.property) API to retrieve the corresponding field for a property. This works correctly for simple properties but fails for properties nested within a struct or a struct array.
For example, given an element with an EC struct as shown below, the API successfully returns the field for the "stringProp" with the value "345", but fails for the "stringProp" with the value "123".
I observed that for the top-level "stringProp" (value "345"), its property name is "pc_schemaAlias_className_stringProp", while for the nested "structProp:stringProp", its property name is only "stringProp". This difference is likely why the API does not work for the nested property.
I wonder if this is a bug for the API and whether is there a more reliable way to locate the exact property path within an element for a given PropertyRecord.
Beta Was this translation helpful? Give feedback.
All reactions