Vue-js-modal: Set height dynamically

Created on 11 Jul 2017  路  4Comments  路  Source: euvl/vue-js-modal

Is it possible?

question

Most helpful comment

@euvl thanks for that. I made temporary workaround:

normalizeHeight () {
        setTimeout(function () {
          const modal = document.querySelector('.v--modal-box.v--modal')
          if (modal) {
            modal.style.height = this.modalType === 'register' ? '420px' : '350px'
            if (this.modalType === 'register' && !this.newTop) {
              this.newTop = true
              modal.style.top = (parseInt(modal.style.top) - 50) + 'px'
            }
          }
        }.bind(this), 50)
}

All 4 comments

nope 馃槃

bad news :(

Hey @howardEagle,

I have finally added height="auto" flag & scrollable content, if you are using the component, please take a look here:

https://github.com/euvl/vue-js-modal#height-auto

@euvl thanks for that. I made temporary workaround:

normalizeHeight () {
        setTimeout(function () {
          const modal = document.querySelector('.v--modal-box.v--modal')
          if (modal) {
            modal.style.height = this.modalType === 'register' ? '420px' : '350px'
            if (this.modalType === 'register' && !this.newTop) {
              this.newTop = true
              modal.style.top = (parseInt(modal.style.top) - 50) + 'px'
            }
          }
        }.bind(this), 50)
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

at0g picture at0g  路  3Comments

smholsen picture smholsen  路  4Comments

mbalandis picture mbalandis  路  4Comments

Zyles picture Zyles  路  5Comments

a3020 picture a3020  路  5Comments