refactor(plugin-workflow): allow to use function for values when creating node (#3002)
This commit is contained in:
parent
8ee8b0052a
commit
e74fcc32e7
@ -71,7 +71,7 @@ export function AddButton(props: AddButtonProps) {
|
|||||||
const instruction = instructions.get(type);
|
const instruction = instructions.get(type);
|
||||||
if (optionKey) {
|
if (optionKey) {
|
||||||
const { value } = instruction.options?.find((item) => item.key === optionKey) ?? {};
|
const { value } = instruction.options?.find((item) => item.key === optionKey) ?? {};
|
||||||
Object.assign(config, value);
|
Object.assign(config, typeof value === 'function' ? value() : value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resource) {
|
if (resource) {
|
||||||
|
Loading…
Reference in New Issue
Block a user