pharos icon indicating copy to clipboard operation
pharos copied to clipboard

Pharos Menu styling issue when the last menu item is an mfe being mounted

Open ymouzakis opened this issue 10 months ago • 1 comments

Expected behavior Second to last menu item is lacking border.

Actual behavior Each menu item has a border except for the last one.

Steps to reproduce the issue

  1. Create a pharos menu with three items, two vanilla menu items, one citation menu item (from mfe-citation)
  2. Note that the second to last menu item is lacking border.

Screenshots or code Image

Image

Pharos version Indicate which version of Pharos you are using.

Your environment

  • OS: [e.g. macOS]
  • Browser: [e.g. Chrome, Firefox, Safari]
  • Version: [e.g. 88]

Additional information I think a way to fix this to have some type of observer in the menu which is watching to see how the menu changes over time, and re-rendering.

ymouzakis avatar Jan 30 '25 15:01 ymouzakis

@ymouzakis thanks for reporting; I agree this is probably because the slotted content is changed after the component is initially created. One approach may be to call this.requestUpdate() on the slotchange event in the DropdownMenu's code.

daneah avatar Jan 30 '25 15:01 daneah