Alternative to .15 dialog for form prop of old .14 dialog



  • This is what I had in .14
    I see the form prop is gone from the dialog component how do I accomplish the same now?
    I assume some alternative was created for before just dropping this???
    Would that be a modal? I liked option of having a simple form not part template but in the code.

        add () {
          this.$q.dialog.create({
            title: 'Add a new device',
            position: 'top',
            form: {
              name: {
                type: 'text',
                label: 'Enter a unique device name',
                model: ''
              },
              desc: {
                type: 'text',
                label: 'Enter a Description',
                model: ''
              },
              header1: {
                type: 'heading',
                label: 'Choose the hardware'
              },
              hardware: {
                type: 'radio',
                items: this.hardwareOpts,
                model: ''
              }
            },
            buttons: [
              {
                label: 'create',
                color: 'positive',
                handler: (data) => {
                  console.log('dialog data', data)
                  hardware.create({'name': data.name, 'desc': data.desc, 'hardware': data.hardware})
                    .then(response => {
                      console.log('created document id= ', response._id)
                      this.$data.items.push(response)
                      this.$q.toast.create.positive('new device created')
                      return response._id
                    })
                    .catch((err) => {
                      console.log('find error', err)
                    })
                }
              },
              {
                label: 'Cancel',
                color: 'negative',
                handler () {
                  return false
                }
              }
            ]
          })
        },