Skip to main content
Question

setPluginData between files on ComponentSet/Component

  • February 14, 2024
  • 1 reply
  • 197 views

Nikita_Balakirev

Preconditions:
I have two files, the first one is a feature file, and another one is a library with components.

What I’m trying to achieve is the following:

  1. user A via some interaction, calls setPluginData on ComponentSetNode, this ComponentSetNode has child ComponentNode A
  2. user B selects InstanceNode where mainComponent is a ComponentNode A
  3. I want to getPluginData from the ComponentSetNode above. so the chain is instance.mainComponent.parent.getPluginData() - here I always get undefined

Can it be the problem that this ComponentSetNode is defined in another file? How can I save data on a component set and then get it on the instance level?

This topic has been closed for replies.

1 reply

Nikita_Balakirev

Ok, I was able to achieve it by using addDevResourceAsync, but still not sure why it doesn’t work with setPluginData