Skip to content

Commit

Permalink
Fix custom labels not being displayed
Browse files Browse the repository at this point in the history
Custom labels are represented as two fields with a prefix, e.g., `group1.X-ABLabel` and `group1.TEL`. Previously, `canDisplay` would check whether it could display `group1.TEL`, which is never a known property type. Instead we now check the property type after the `.`, which in our example is `TEL` which is displayable.

Signed-off-by: Y0hy0h <y0hy0h@gmx.net>
  • Loading branch information
j-maas authored and skjnldsv committed Feb 18, 2021
1 parent 754a7cf commit 2e8a06f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ContactDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,9 @@ export default {
* @returns {boolean}
*/
canDisplay(property) {
const propModel = rfcProps.properties[property.name]
// Make sure we have some model for the property and check for ITEM.PROP custom label format
const propModel = rfcProps.properties[property.name.split('.').pop()]

const propType = propModel && propModel.force
? propModel.force
: property.getDefaultType()
Expand Down

0 comments on commit 2e8a06f

Please sign in to comment.