SAP/ui5-webcomponents-ngx

Issues with the boolean properties

InnaAtanasova opened this issue · 1 comments

  • Input - disabled and readonly
  • Link - disabled
  • Tabs - selected
  • Multi combo box - disabled and readonly

Example:
<ui5-tab text="Tab 8" selected></ui5-tab> - selected is not working
<ui5-tab text="Tab 8" [selected]="true"></ui5-tab> should be set to "true" to work

Hi Inna,
yes I noticed it as well,
this is common for all boolean properties as they are generated as regular inputs at the moment:
@Input disabled = false

While in Angular >=16, we can use booleanAttribute transformers to enable attributes working with the attr syntax:
@Input({ transform: booleanAttribute })

So, there is clear solution and it is to use the { transform: booleanAttribute }.

The good things is that even now the syntax that you highlighted is good enough and I already updated all storybook stories in the PR to make use of ti, so that the samples are working properly.

But it's good to keep this issue open as this for sure can and needs to be enhanced.