Don't load the navigable list controller on mobile

This commit is contained in:
Adrien Maston
2025-12-19 12:16:04 +01:00
parent 586cc79ebb
commit b49aa9cbf1
3 changed files with 23 additions and 1 deletions
@@ -1,5 +1,6 @@
import { Controller } from "@hotwired/stimulus"
import { nextFrame } from "helpers/timing_helpers"
import { isMobile } from "helpers/platform_helpers"
export default class extends Controller {
static targets = [ "item", "input" ]
@@ -18,6 +19,11 @@ export default class extends Controller {
onlyActOnFocusedItems: { type: Boolean, default: false }
}
// Don't load for mobile devices
static get shouldLoad() {
return !isMobile()
}
connect() {
if (this.autoSelectValue) {
this.reset()