Sha256: 8d8d9b10490be92ad65dfaf44070f66e96cb4d6bcdeaf68792aa32870a5ff15c

Contents?: true

Size: 404 Bytes

Versions: 256

Compression:

Stored size: 404 Bytes

Contents

import { Controller } from '@hotwired/stimulus'

export default class extends Controller {
  static targets = ['modal']

  close() {
    this.modalTarget.remove()

    document.dispatchEvent(new Event('actions-modal:close'))
  }

  delayedClose() {
    const vm = this

    setTimeout(() => {
      vm.modalTarget.remove()
      document.dispatchEvent(new Event('actions-modal:close'))
    }, 500)
  }
}

Version data entries

256 entries across 256 versions & 1 rubygems

Version Path
avo-3.0.1.beta11 app/javascript/js/controllers/modal_controller.js
avo-3.0.0.pre19 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta8 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta9 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta6 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta7 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta5 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta2 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta4 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta3 app/javascript/js/controllers/modal_controller.js
avo-3.0.0.beta1 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta1 app/javascript/js/controllers/modal_controller.js
avo-3.0.0.pre17 app/javascript/js/controllers/modal_controller.js
avo-3.0.0.pre18 app/javascript/js/controllers/modal_controller.js
avo-3.0.0.pre14 app/javascript/js/controllers/modal_controller.js
avo-3.0.0.pre16 app/javascript/js/controllers/modal_controller.js
avo-3.0.0.pre15 app/javascript/js/controllers/modal_controller.js
avo-3.0.0.pre13 app/javascript/js/controllers/modal_controller.js
avo-3.0.0.pre12 app/javascript/js/controllers/modal_controller.js
avo-3.0.0.pre10 app/javascript/js/controllers/modal_controller.js