Wire up comboboxes
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { Controller } from "@hotwired/stimulus"
|
||||
|
||||
export default class extends Controller {
|
||||
closeOnFocusOutside(event) {
|
||||
if (!this.element.contains(event.relatedTarget)) {
|
||||
this.element.removeAttribute("open")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user