Stop EmbeddedView from opening new tab after setting props.path

Hello all,

I have an EmbeddedView which has two Message Handlers configured for it. I am using script inside an onItemClicked event in a HorizontalMenu to send the message to the Handlers. I am able to successfully change the path of the EmbeddedView but a new “unwanted” tab also opens. Can someone please help me understand why the new tab is opening and how to stop it?

Kind regards

Please post you script, so we can start there and let you know if we see any issues with it.

Sure, below is an example of how I am changing the path using the Message Handler that is on my EmbeddedView

self.props.path = “path_to_view

And here is an example of how I am calling the Message Handler from an onItemClicked event that is on my HorizontalMenu

system.perspective.sendMessage(“handler_name”)

The event fires, the handler is called and the path changes. But another tab opens up with a 404 error. I’m trying to stop that tab from opening.

The Horizontal Menu performs navigation when items are clicked. That’s just what the component does. There is no way to intercept the navigation, other than to modify the navigation to either be a Perspective page sort of navigation or a URL navigation. If you want to change the path of an Embedded View, then you will need to use a different component.