-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Labels
fixneeds: prioritizationTo be prioritizedTo be prioritizedpriority: lowSeverity level: 3Severity level: 3
Description
pfe-dropdown: role attribute not set properly in React and Vue
This test fails in React and Vue.
https://github.com/patternfly/patternfly-elements/blob/master/elements/pfe-dropdown/test/pfe-dropdown_test.html#L82
Impacted component(s)
- pfe-dropdown and pfe-dropdown-item
Steps to reproduce
- Go to https://codesandbox.io/s/pfe-dropdown-issue-1010-qwsqd
- View the React version and the plain HTML version
- The role attribute on the first pfe-dropdown-item is not present
- See that the role attribute on the first pfe-dropdown-item is present in the plain HTML version
Expected behavior
The role of the pfe-dropdown-item should be a menu item if the pfe-item-type is a link.
Screenshots
Developer notes
I suspect it's an issue related to the timing of finding this._item in the slot in the constructor of PfeDropdownItem. This shouldn't be done in the constructor. And since the attributeChangedCallback is firing before the connectedCallback, we can't set this._item in the connectedCallback either. I think we'll need to set this._item in the attributeChangedCallback.
Metadata
Metadata
Assignees
Labels
fixneeds: prioritizationTo be prioritizedTo be prioritizedpriority: lowSeverity level: 3Severity level: 3
