Sha256: 2544ebd609ed95907fd87e07289ac237eccb06c7f32a5519fbb301b57108ca46

Contents?: true

Size: 283 Bytes

Versions: 5

Compression:

Stored size: 283 Bytes

Contents

import { Controller } from '@hotwired/stimulus'
import { useClickOutside } from 'stimulus-use'

export default class extends Controller {
  connect() {
    useClickOutside(this)
  }

  clickOutside() {
    this.close()
  }

  close() {
    this.element.removeAttribute('open')
  }
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_admin-0.3.2 app/components/solidus_admin/ui/dropdown/component.js
solidus_admin-0.3.1 app/components/solidus_admin/ui/dropdown/component.js
solidus_admin-0.3.0 app/components/solidus_admin/ui/dropdown/component.js
solidus_admin-0.2.0 app/components/solidus_admin/ui/dropdown/component.js
solidus_admin-0.1.0 app/components/solidus_admin/ui/dropdown/component.js