The CreatorCon Call for Content is officially open! Get started here.

How to reset the viewport modal content, when toggling record pages?

NOWvilla
Giga Contributor

I have a viewport modal in a configurable workspace record page, that seems to be caching and not updating when a new record page is opened.

 

For simplicity, the viewport modal loads a page that has a heading label, tied to a required-param (testParam).


For example:

If I visit record A and open the viewport, I pass in a required param (testParam="A"), the modal works as expected.

If I then proceed to visit record B, I'd expect to see the heading read "B", since record B passes in testParam="B".

 

No matter how many other records I go to, the content in the viewport modal persists with the params set in record A.

 

Note: If I close all tabs and open a new record (ie. record C) then the viewport modal is reset. Having to close all tabs to have the viewport modal reset wouldn't be a very natural experience.

 

I've tried passing in a timestamp as a required prop, as well as a few other hacks, but none seem to resolve the issue.

Also tried setting the maxCachePagelimit to 1, but no luck


Any guidance or workaround?

0 REPLIES 0