reload prev data for custome react component plugin after reload page
Question
Hello @artf i am working with that awesome tool for long time i integrate it with react , and create a react plugin component for it , and create custom trait to get data from api and render it throw the plugin , i setup a local storage and also make a button to save all data in the local storage and db but i have a little problem , that when i reload page , all data for the custom component gone , and load the default setup , despite of all the others plugin keep it's own data when reload page , sorry if i didn't follow template for the issue , this is my first time to post my question on git , so if i made a mistake , just tell me and i will solve it thanks @artf
Answers (3)
For sure you didn't configure correctly the Storage Manager Please read carefully this guide https://grapesjs.com/docs/modules/Storage.html
thanks @artf for answer , i know how much time is important to you , but sorry for that , i configure it correctly , also i am get 200 for post request , also i get all of html and components and css for load request , but i have a little problem for prev traits for component , and render prev data

and my porblem is i can't save that traits and get the same data from storage after reload editor and this screen to show that data and traits below

so when i reload editor it will like this

it's render the default data for component when first initial , not the final data which i stored in db even html data in canvas or the traits and options for component
i am sorry to bother you @artf , and wish you can help !
How did you define that custom component?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1493
[QUESTION] render() works on the first time but not on subsequent calls
Hello, I've created a custom component that shows images using background-image on a <div> instead of using an <img> element. It's mostly w...
Issue #1679
How to render component in canvas using trait.
Hi Artf ,Thanks for your great tool,I have created test case for my problem https://js.do/code/271771 I have created custom tool sidebar an...
Issue #1479
Custom element with pop-up
hello @artf I've make pop-up for select custom link data but data is save and also display when we click on export html. But data is not re...
Issue #2952
Custom component is not working after saving.
Hi, I have Button-Link custom component created, and when I dragged into canvas for the first time component is detecting its attributes an...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.