Hide filters by default on mobile

This commit is contained in:
Adrien Maston
2026-01-20 13:39:00 +01:00
parent 161925ab2b
commit 3a685ca2b9
5 changed files with 64 additions and 24 deletions
@@ -0,0 +1,16 @@
import { Controller } from "@hotwired/stimulus"
import { isNative } from "helpers/platform_helpers"
export default class extends Controller {
static get shouldLoad() {
return isNative()
}
static values = { autoExpandSelector: String }
connect() {
if (this.hasAutoExpandSelectorValue && this.element.querySelector(this.autoExpandSelectorValue)) {
this.element.open = true
}
}
}