我正在使用 Zapier CLI 构建一个 Zapier 应用程序。
我创建了 2 个动态输入字段,均由 API 填充。
字段 2 ( channelId
) 取决于字段 1 ( appId
) 中的选择。
inputFields: [
{
key: 'appId',
label: 'App',
required: true,
type: 'text',
helpText: 'Choose the App',
dynamic: 'app.id.display_name',
altersDynamicFields:true,
},
{
key: 'channelId',
label: 'Channel',
required: true,
type: 'string',
helpText: 'Choose the Channel',
dynamic: 'channel.channel',
}
]
这在用户第一次做出选择时效果很好。
但是,如果他们选择这两个选项,然后更改字段 1 ( appId
),则不会清除字段 2 ( channelId
)中的选择
如果您重新打开菜单,您会看到新的选择 - 因此该perform
函数正在资源中运行,但之前选择的值不会被清除 - 留下无效的选择。
当改变它的字段被更改时,如何确保清除依赖字段?