function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jaelee125jaelee125 

Refreshing page when LWC Screen Action modal is opened

I'm currently using LWC Screen Action to use LWC as a quick action. When I have the modal opened and refresh the page, the page reloads with the modal opened. However, no UI is generated in the modal. 

Is there way to close the modal when the page is refreshed? Or is there a way to get the modal to render properly when page is refreshed while modal is opened?

I can just use Aura to wrap the LWC like in previous releases, but was wondering if there was any sort of way to achieve this using screen actions. 
Forum TeamForum Team
Hi,

I have read your query and here is my two cents on this:

When a page refreshes, Quick action modal should get closed like it does for Quick Action with Aura component. And I think modal staying open after the page refreshes is a bug on the Salesforce end, because the lifecycle hooks (connectedCallBack, renderedCallBack) aren't getting called which is the reason why UI does not get rendered. I would suggest you wrap your LWC in Aura component and use the wrapper aura component with quick action and avoid using LWC directly with quick actions as there are a lot of other bugs as well like not getting @api recordId etc.

Hope that answers your question.