[feature request] Perspective - Menu Tree - sync when using system.perspective.navigate

Perspective Menu Tree is perfect for navigation strategy, but sometime we use too system.perspective.navigate to select a view and in this case the tree is not updated according the page opened.
It will be usefull to be able to have a prop change the selection in the menu tree (without double triggering the navigate)

2 Likes

Why not create your own custom wrapper method for system.perspective.navigate that sends a message to a handler on the Menu Tree component telling it how to update? I like to create scripts like this under similarly named custom script libraries. For example, the following might be found within a script library named custom.perspective so that you would simply call custom.perspective.navigate instead of system.perspective.navigate where needed:

def navigate(page, pageId, newSelectionValue):
	system.perspective.navigate(page, pageId)
	messageType = 'UpdateMenuTree'
	payload = {'selection'	: newSelectionValue}
	system.perspective.sendMessage(messageType, payload)

There is no method exposed to control the selection on the menu tree

Oops, I was thinking of the Perspective Tree component:

image

Ignore my previous post. :upside_down_face:

Hi @mazeyrat, has this ever been looked into by the dev team? its a constant source of frustration when combining alternative navigation links in a session view? :crazy_face:

1 Like

Perhaps if more users vote for this feature:

4 Likes

done

2 Likes

Wish this was possible, its really confusing for users when the menu isn't updated.
I added my vote :slight_smile:

1 Like

Yes I found this very annoying !

1 Like