The custom traits are only displayed the first time #5165
Replies: 1 comment
-
Please refer to the new API to define custom traits https://grapesjs.com/docs/modules/Traits.html#define-new-trait-type |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
i am stuck in this problem and i dont know how to get out of it. I created a custom trait that retrieves data through a call to an external API, this custom traits is used by several components, what happens is that only the first time I select the component the custom trait is rendered correctly, if I try to click again on the component this is no longer displayed, it seems as if it stays in the cache and no longer makes the call to the external api.
This is the result after the first click of the component in the editor
This is the result on subsequent clicks of the same component in the editor
This is the code of custom traits, on the first click of the component it manages to call the "getInputEl" function so as to create the list with the remote data
and this is the code of component
Beta Was this translation helpful? Give feedback.
All reactions