Skip to main content

Does anyone know of a way to get access to selected parameter inputs before submitting the function on ‘run’?


I can see the parameters after it is submitted, but not before…


I’m experimenting with accepting parameters on input (read more here) and it seems there isn’t a way to do this. This would help with filtering or suggesting different inputs based on previous responses.


Thanks!

figma.parameters.on(
'input',
({ parameters, key, query, result }) => {
switch (key) {
case 'parameter1':
result.setSuggestions([query]);
break;

case 'parameter2':
if (parameters['parameter1'] === something) {
// do something
}
else {
// do something else
}
break;

...
default:
return
}
}
)

This works thanks for your help I appreciate it.


Reply