mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 00:01:55 +00:00
fix setTab expr
This commit is contained in:
@@ -29,7 +29,10 @@
|
||||
configuration: {
|
||||
gotoUrl: { url: (() => string) | string | undefined; newTab: boolean | undefined }
|
||||
setTab: {
|
||||
setTab: { id: string; index: number }[] | undefined
|
||||
setTab:
|
||||
| (() => { id: string; index: number }[])
|
||||
| { id: string; index: number }[]
|
||||
| undefined
|
||||
}
|
||||
sendToast?: {
|
||||
message: (() => string) | string | undefined
|
||||
@@ -135,8 +138,11 @@
|
||||
|
||||
switch (sideEffect.selected) {
|
||||
case 'setTab':
|
||||
const setTab = sideEffect?.configuration.setTab?.setTab
|
||||
|
||||
let setTab = sideEffect?.configuration.setTab?.setTab
|
||||
if (!setTab) return
|
||||
if (typeof setTab === 'function') {
|
||||
setTab = await setTab()
|
||||
}
|
||||
if (Array.isArray(setTab)) {
|
||||
setTab.forEach((tab) => {
|
||||
if (tab) {
|
||||
|
||||
@@ -503,7 +503,8 @@ const onErrorClick = {
|
||||
value: [] as Array<{ id: string; index: number }>,
|
||||
fieldType: 'array',
|
||||
subFieldType: 'tab-select',
|
||||
tooltip: 'Set the tabs id and index to go to on error'
|
||||
tooltip: 'Set the tabs id and index to go to on error',
|
||||
onDemandOnly: true
|
||||
}
|
||||
},
|
||||
sendErrorToast: {
|
||||
|
||||
Reference in New Issue
Block a user