Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leastDestructiveRef of CAlertDialog seems not working #546

Open
odiak opened this issue Oct 10, 2022 · 0 comments
Open

leastDestructiveRef of CAlertDialog seems not working #546

odiak opened this issue Oct 10, 2022 · 0 comments

Comments

@odiak
Copy link

odiak commented Oct 10, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant