No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Using both prompt and options in v0.15.3 this.$q.dialog without a custom modal

    Framework
    dialog modal options prompt qdialog
    1
    1
    762
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mlars84
      mlars84 last edited by

      I have a dialog/modal that primarily needs the options, but I would like to add a small prompt/note to the selected options without having to write a custom modal. Any way to find a simple way to tag on a prompt as was previously possible with Dialog? Currently it appears that if you add a prompt after the options object, it only recognized the prompt and passes that through as data. Here’s the code I’m working with:

      this.$q.dialog({
                title: 'Visit Result',
                color: 'primary',
                ok: true,
                cancel: true,
                options: {
                  type: 'radio',
                  model: 'opt1',
                  inline: true,
                  items: [{
                    label: 'Not Home',
                    value: 'Visited - Not Home',
                    color: 'primary'
                  },
                  {
                    label: 'Home',
                    value: 'Visited - Home',
                    color: 'primary'
                  },
                  {
                    label: 'No Soliciting',
                    value: 'Visited - No Soliciting',
                    color: 'primary'
                  },
                  {
                    label: 'Presented Fiber Service',
                    value: 'Presented Fiber Service',
                    color: 'primary'
                  },
                  {
                    label: 'Ordering',
                    value: 'Ordering',
                    color: 'primary'
                  },
                  {
                    label: 'Not interested',
                    value: 'Not interested',
                    color: 'primary'
                  },
                  {
                    label: 'Stop back',
                    value: 'Stop back',
                    color: 'primary'
                  },
                  {
                    label: 'Presented TDM Service',
                    value: 'Presented TDM Service',
                    color: 'primary'
                  },
                  {
                    label: 'No Computer',
                    value: 'No Computer',
                    color: 'primary'
                  }
                  ]
                },
                prompt: {
                  type: 'text',
                  label: 'Add Visit Note',
                  model: ''
                }
              })
                .then(data => {
                  this.$q.notify({ message: `You chose ${JSON.stringify(data)}`, color: 'positive' })
                })
                .catch(() => {
                  this.$q.notify({ message: 'Cancelled', color: 'negative' })
                })
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post