Make filters "open" by default then hide in mobile apps
This commit is contained in:
@@ -9,8 +9,6 @@ export default class extends Controller {
|
||||
static values = { autoExpandSelector: String }
|
||||
|
||||
connect() {
|
||||
if (this.hasAutoExpandSelectorValue && this.element.querySelector(this.autoExpandSelectorValue)) {
|
||||
this.element.open = true
|
||||
}
|
||||
this.element.open = this.hasAutoExpandSelectorValue && this.element.querySelector(this.autoExpandSelectorValue)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%= tag.details class: "expandable-on-native",
|
||||
open: true,
|
||||
data: {
|
||||
controller: "expandable-on-native",
|
||||
expandable_on_native_auto_expand_selector_value: "[data-filter-show=true]" } do %>
|
||||
|
||||
Reference in New Issue
Block a user