In the properties-panel-extension example a component is passed when creating a new entry in the panel, specifically here,
export default function(element) {
return [
{
id: 'spell',
element,
component: Spell,
isEdited: isTextFieldEntryEdited
}
];
}
The component can then access the element as follows:
function ZDFTextArea(props) {
const { element, id } = props;
My question is: how can I pass other values besides element at this point? More specifically, I have a use case in which I have to pick between TextArea, Select and Checkbox, but some code (like fetching the labels) is common to all three. So I would like to be able to calculate that in the default function above and then pass values to the component. Is that possible?