Hi
I’m struggling to get access to a ComponentNode’s children. I’m probably missing something, so wondered if someone can help? Thanks in advance!
I’ve tried 2 ways of getting access to the main component. Both appear ok in the console, but when I try and access it’s children I get empty arrays.
//passed in as a function constructor
console.log(tableComponent);
const columns = tableComponent.findChildren(n => n.type === "FRAME");
const findTable = figma.currentPage.findOne(n => n.name === tableComponent.name) as ComponentNode;
const columns2 = findTable.findChildren(n => n.type === "FRAME");
console.log(findTable);
console.log(columns.length);
console.log(columns2.length);