Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

leastDestructiveRef of CAlertDialog seems not working #546

Open
@odiak

Description

@odiak

Describe the bug
I specified CAlertDialog's leastDestructiveRef with ref of second button, but the first button was initially focused.

<CAlertDialog
    :is-open="isOpen"
    :least-destructive-ref="$refs.cancelRef"
    :on-close="closeDialog">
  <CAlertDialogOverlay />
  <CAlertDialogContent>
    <CAlertDialogHeader>...</CAlertDialogHeader>
    <CAlertDialogBody>...</CAlertDialogHeaderBody>
    <CAlertDialogFooter>
      <CButton>Do it</CButton>
      <CButton ref="cancelRef">Cancel</CButton>
    </CAlertDialogHeaderFooter>
  </CAlertDialogContent>
</CAlertDialog>

Expected behavior
Second button is focused initially.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions