mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-24 08:01:38 +00:00
fix tab saved changes (#6930)
This commit is contained in:
+6
-2
@@ -20,6 +20,7 @@
|
||||
additionalExitAction?: () => void
|
||||
triggerOnSearchParamsChange?: boolean
|
||||
onDiscardChanges?: () => void
|
||||
tabMode?: boolean
|
||||
}
|
||||
|
||||
let {
|
||||
@@ -27,7 +28,8 @@
|
||||
diffDrawer = undefined,
|
||||
additionalExitAction = () => {},
|
||||
triggerOnSearchParamsChange = false,
|
||||
onDiscardChanges = undefined
|
||||
onDiscardChanges = undefined,
|
||||
tabMode = false
|
||||
}: Props = $props()
|
||||
let savedValue: Value | undefined = $state(undefined)
|
||||
let modifiedValue: Value | undefined = $state(undefined)
|
||||
@@ -66,7 +68,9 @@
|
||||
orderedJsonStringify(replaceFalseWithUndefined(draftOrDeployed)) ===
|
||||
orderedJsonStringify(replaceFalseWithUndefined(current))
|
||||
) {
|
||||
bypassBeforeNavigate = true
|
||||
if (!tabMode) {
|
||||
bypassBeforeNavigate = true
|
||||
}
|
||||
additionalExitAction?.()
|
||||
} else {
|
||||
await openModal()
|
||||
|
||||
@@ -1047,6 +1047,7 @@
|
||||
getInitialAndModifiedValues={getAllUnsavedChanges}
|
||||
onDiscardChanges={discardAllChanges}
|
||||
triggerOnSearchParamsChange={true}
|
||||
tabMode={true}
|
||||
/>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user