Skip to content

v0.79.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 02 Oct 15:15
6797bdf

Minor Changes

  • #807 ce19c264 Thanks @tenphi! - Breaking Change: AlertDialog API cancel button behavior changed

    The cancel button in AlertDialog now rejects the promise instead of resolving with 'cancel' status, aligning it with the dismiss (Escape key) behavior.

    Migration Guide:

    Before:

    alertDialogAPI.open({...})
      .then((status) => {
        if (status === 'cancel') {
          // Handle cancel
        } else if (status === 'confirm') {
          // Handle confirm
        }
      })

    After:

    alertDialogAPI.open({...})
      .then((status) => {
        if (status === 'confirm') {
          // Handle confirm
        } else if (status === 'secondary') {
          // Handle secondary action
        }
      })
      .catch(() => {
        // Handle cancel or dismiss
      })

    Note: AlertDialogResolveStatus type no longer includes 'cancel' - it now only contains 'confirm' | 'secondary'.