170
Views
1
Comments
How to refresh the page layout and if function after browser clicks to go back?

Hi, basically when the dropdown is clicked/opened, it will change the container's padding. Then the user needs to click "close the dropdown" to change the container's padding back to normal. 

Dropdown action: 

Container style class:  If(IsDropdownActionOpened ,"action-open", "action-close")

However, I found a problem that when the dropdown is opened, and the user clicked an option and navigated to another page. But the container's padding won't refresh back to the original padding after the user clicked on the browser's "left arrow button" as shown below. 

How can I fix this problem? Or is there a method that I can refresh the If function above?

2022-08-03 04-32-50
Ravi Punjwani

Any changes that you want to track with relating to the browser's back button, you can do so by using the following in the concerned screens' OnReady event:

Javascript: navigatedFromHistory()
https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/JavaScript_API/Navigation#navigatedfromhistory

You can create small javascript to make it working like a client action.


Then use this client action inside any of your screen's OnInitialize, OnReady, or any other client actions where you want to check if the current screen is visited by result of a BackNavigation or not.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.