patternfly-elements icon indicating copy to clipboard operation
patternfly-elements copied to clipboard

[fix]: [pfe-navigation 1.x] doesn't work with Angular

Open grandemayta opened this issue 5 years ago • 6 comments

I am working with Patternfly Elements and I having some issues with Angular integration.

pfe-navigation doesn't work with Angular

Impacted component(s)

  • pfe-navigation

Steps to reproduce

I created on Sandbox an Angular project with the pfe-navigation, you can find on this link: https://codesandbox.io/s/pfe-navigation-patternfly-rs0if

Expected behavior

We should see the patternfly menu.

Screenshots

pfe-navigation-error

grandemayta avatar Jun 11 '20 14:06 grandemayta

@grandemayta - Thanks for pointing this out. I suspect it has something to do with the component using querySelector in the connectedCallback. I'll take a look to see what I can find.

kylebuch8 avatar Jun 11 '20 14:06 kylebuch8

Hi guys, for the moment we fixed the problem with this workaround:

pfe-element.js: carbon (5) carbon (6) pfe-navigation.js carbon (7)

I know this is not the best solution but maybe can help you to understand where is the issue. regards,

grandemayta avatar Jul 03 '20 14:07 grandemayta

Hi @grandemayta, I'll help follow up on this to see where we're at with debugging.

In future, would you please avoid using "guys" as a greeting? We're a diverse group of developers. 🙂 Thank you!

castastrophe avatar Jul 16 '20 10:07 castastrophe

@kylebuch8 Was this issue resolved or do we still need a PR to get this patched?

castastrophe avatar May 11 '21 15:05 castastrophe

I upgraded to 1.8.0 for pfe-navigation and am now seeing Cannot read property 'querySelector' of null on this line in the constructor:

this._menuItem.shadowRoot.querySelector(".pfe-navigation-item__trigger").addEventListener("click", this._menuItemClickHandler);

I think we need a promise to wait until the _menuItem is upgraded before running the query

castastrophe avatar May 22 '21 14:05 castastrophe

I have the same issue with Vuejs. The component is useless and breaks the whole app.

frpol9 avatar Sep 17 '21 18:09 frpol9