PanelMenu problem, link reload #147
-
Hi, when I use PanelMenu component, and add url parameter for each link, now, page reload when i click on different links. I added url parameter because I want when I right-clicked on item, and go on 'open in new browser' to open that link in new tab. So, is there property that prevent reload page when click on unclicked item. I also want to keep url prop, because right-click functionality...Thank you in advance.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
On your <p:menuitem value="My External Link"
url="https://google.com" icon="fas fa-up-right-from-square" target="_blank" ajax="false"
iconPos="right" /> |
Beta Was this translation helpful? Give feedback.
Since the
menuitem
s render asa
elements, you might needonclick
withpreventDefault
, like described here:https://stackoverflow.com/questions/72870959/how-to-create-anchor-tag-link-that-works-only-on-right-click