Godofbrowser/vuejs-dialog

Feature request: text prompt

symonsoft opened this issue ยท 9 comments

I think it will be useful to have ability to prompt for text information in a single (single/multiple line) text field.
Is it likely to implement such a feature?

Oh I see after some code investigation that it's almost possible with:

let options = {
  message: 'Prompt title',
  verification: '',
  verificationHelp: 'Prompt message'
}

this.$dialog.open('prompt', options)
  .then((dialog) => {
    console.log('Input text: ' + dialog.data)  // always null
  })

But dialog.data is always null....
Then requesting dialog.data for input text and something simplier like:

this.$dialog.prompt('Prompt message')
    .then((dialog) => {
      console.log('Input text: ' + dialog.data)
    })

I think it would be a very useful feature.

that's actually what a "prompt" is in a javascript context... which it claims to have but actually doesn't support

https://developer.mozilla.org/en-US/docs/Web/API/Window/prompt

Hi, I've been tight on schedule. I'll try to implement this feature this weekend

@Godofbrowser Please, don't forget and abandon your thankful users! We still hope for the release.

@symonsoft as he has shown interest in implementing it, but is just too tight on schedule; maybe you could make a PR for it? ๐Ÿ˜‰ (I'm using dialog from Buefy for my purposes, as we were using Bulma styling already anyway)

So sorry guys, i'm currently adding this feature. I'm hoping an hour would be enough

That also works :)

No problem, we all have lives besides open source code too ;)

Meaanwhile, this can be done easily with custom view. i have a sample implementation (basic) where i'm using a custom view to show a cropper for photo uploads.

https://snag.gy/OVAHkd.jpg

https://snag.gy/Q3RZjB.jpg

https://snag.gy/O6YMXz.jpg

https://snag.gy/CxVNg9.jpg

#48 Will resolve this