ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

chore: respect hyphenated class members in cem

Open DonkeyCo opened this issue 1 year ago • 0 comments

Classes with a hyphenated member (e.g. "header-row") or a string member are not correctly handled by the custom elements manifest.

If these types of members exist and are used as either slot or property, they are not respected as such, as the cem is not able to find a corresponding classNodeMember. This is due to the following:

  • member.name contains the unescaped member name, e.g. "header-row"
  • classNodeMember.name contains the escaped member name, e.g. header-row

As there is a mismatch, slot assignment is completely skipped.

We've observed this problem in the new Web Component Table (Grid), where one of our members is hyphenated. You can see the problem in the documentation here.

Solved by removing member.name's quotation marks, when comparing.

DonkeyCo avatar Apr 30 '24 14:04 DonkeyCo