Deselect column/card selection when clicking outside
This commit is contained in:
@@ -60,6 +60,14 @@ export default class extends Controller {
|
||||
this.#setCurrentFrom(this.#visibleItems[this.#visibleItems.length - 1])
|
||||
}
|
||||
|
||||
deselectWhenClickingOutside(event) {
|
||||
if (this.element.contains(event.target)) {
|
||||
return
|
||||
}
|
||||
|
||||
this.#clearSelection()
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
async selectItem(item, skipFocus = false) {
|
||||
|
||||
Reference in New Issue
Block a user