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

How do I send and use the data that I type inside the prompt action? #142

Open
ericvipo opened this issue Dec 22, 2021 · 1 comment
Open

Comments

@ericvipo
Copy link

async openConfirmDelete() {

  let res = await this.$dialog.prompt({
    title: '¿Quiere anular el trámite Disposición de Inicio de Diligencias Prelimninares?',
    text: 'Indicar el motivo de anulación',
    persistent: true,
    width: '600',
    actions: {
      false: 'Cancelar',
      true: {
        color: 'warning',
        text: 'Aceptar',
        handle: () => {
          return new Promise((resolve) => {
            setTimeout(() => {
              resolve(res + 'o')
              console.log(res);
            }, 3000)
          })
        }
      }
    }
  })

  if (res)
    this.$dialog.notify.info('Your name is ' + res)

},
@yariksav
Copy link
Owner

Your handler and Promise are useless here...

...
      true: {
        color: 'warning',
        text: 'Aceptar'
     }
...


  if (res)
    this.$dialog.notify.info('Your name is ' + res)

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

2 participants