I'm trying to create a button that takes a user to another page in the same extension via tecton.navigateTo, but I can't seem to get it to work. I've looked at all the tecton documentation for navigateTo and don't see anything specific to routing within the same extension.
Example:
actionButtons.forEach((element) => {
// Add routing to action buttons
let routeMap = {
'action-a': 'a_route',
'action-b': 'b_route',
'action-c': 'c_route',
'action-d': 'd_route'
};
element.addEventListener('click', (event) => {
tecton.actions.navigateTo('ExtName', routeMap[event.target.id]);
});
});
And:
actionButtons.forEach((element) => {
// Add routing to action buttons
let routeMap = {
'action-a': 'a_route',
'action-b': 'b_route',
'action-c': 'c_route',
'action-d': 'd_route'
};
element.addEventListener('click', (event) => {
tecton.actions.navigateTo('ExtName', {'routing_key': routeMap[event.target.id]});
});
});
Each value in the routeMap array correlates to a method in my extension.py file. When I click on a button, nothing happens. No errors or anything. I know the event listener is firing because I can log a message when it's clicked.
I'm open to better or different ways to do this if there are any.