Storgae API is not maintaining data on web page refresh

I am storing a data using storage api, it is working fine on same session, but as soon as I refresh the web page I am not getting the saved data using storage api. Can you please help me over here?

Thank you

Hi @vipul321!

Can you confirm whether your application works in the front end or back end?

It is on frontend, we are using angular and fetching data from sdk using graph ql query

Hello there @vipul321,

How are you using the SDK? Exactly which methods are you using for setting data and retrieving it?

Can you share your code and a screen recording of the steps that are being taken with us?

If you have any information you don’t want to share publicly, you can also send all of this to appsupport@monday.com and we can take it from there.

Looking forward to hearing from you :slightly_smiling_face:

Cheers,
Matias

Hi @Matias.Monday , Thanks for your reply. Please have a look at attached video.

You can see that I am storing values of toggle in storage and they are maintaining till I refresh the browser page. But As soon as I refresh the page, they are getting cleared from the storage.

Thank you.

Hello there @vipul321 and thank you for the screen recording!

I will check if this is related to the fact that you are testing it in the preview of the app’s feature configuration page. Have you tried this in an actual board? (outside of the configuration screen)

If you try it in an actual board and it does not work, can you please send me the code you are using?

Cheers,
Matias

Hello again,

After checking with our team, it looks like my hypothesis was correct.

The data in the storage API is saved by an instanceId. When using the “Preview mode” this will not work.

Try this on an actual board and it should work.

Hope that helps!

Cheers,
Matias