SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.48k stars 254 forks source link

[MessageStrip (v2.0.0-rc.5)]: changing `design` from value-states to color-set doesn't remove the icon #9181

Closed Lukas742 closed 4 weeks ago

Lukas742 commented 1 month ago

Bug Description

If the design property of a MessageStrip is changed from any value-state design to any color-set design, the default icon isn't removed.

Affected Component

MessageStrip

Expected Behaviour

No response

Isolated Example

https://stackblitz.com/edit/github-4hh5q2?file=package.json,index.html,main.js

Steps to Reproduce

  1. Go to StackBlitz
  2. Click on the button to change the design of the first two MessageStrips
  3. See that the icons of the MessageStrips aren't removed

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

v2.0.0-rc.5

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

No response

Declaration

ilhan007 commented 1 month ago

Hello @SAP/ui5-webcomponents-topic-rl there is a wrong state of the component when setting not initially but later-on.

When the following state is set later-on, f.e. in a click handler:

document.getElementById('btn').addEventListener('click', () => {
  strip.design = 'ColorSet1';
  strip.colorScheme = '1';
});

The default icon remains:

Screenshot 2024-06-12 at 13 13 54

The same is not displayed if we set the same props and values in the markup (<ui5-message-strip design="ColorSet1" color-scheme="1"):

Screenshot 2024-06-12 at 13 13 58