Skip to content

Commit 574b73b

Browse files
committed
Fix Dialog not calling cancel callback when clicking outside
1 parent 7bb7d2f commit 574b73b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/components/src/components/context/DialogContext.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ const DialogView = React.memo(
190190
options && options.cancelable === false
191191
? undefined
192192
: () => {
193+
buttons
194+
?.find((button) => button?.style === 'cancel')
195+
?.onPress?.('')
193196
hide()
194197
}
195198
}

0 commit comments

Comments
 (0)