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-2.53.0 app/javascript/js/controllers/modal_controller.js
avo-2.52.0 app/javascript/js/controllers/modal_controller.js
avo-2.49.0 app/javascript/js/controllers/modal_controller.js
avo-2.48.0 app/javascript/js/controllers/modal_controller.js
avo-2.47.0 app/javascript/js/controllers/modal_controller.js
avo-3.2.3 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta23 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta20 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta21 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta17 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta22 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta18 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta19 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta24 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta15 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta16 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta14 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta12 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta13 app/javascript/js/controllers/modal_controller.js
avo-3.0.1.beta10 app/javascript/js/controllers/modal_controller.js