hotwire_combobox 0.1.22 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/presenters/hotwire_combobox/component.rb +7 -7
- data/lib/hotwire_combobox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1878c95bed7f503558cad0b607a93745c8049c50bcf0217ca34e45b74c88cae7
|
4
|
+
data.tar.gz: 1f04aea58b60cce2ebaf146be417cc58ab97a6991e78f0ba76f02463e4866b2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de7669fe7f87e0457cf80075952cf76d5fa78265f63d39e5cf3c7a32ceea8534ceca721904d68e57192df38c704f27f1e3bcb0dfa9ae0f6bd6b5a3aee73a1c74
|
7
|
+
data.tar.gz: b8d878fb537e0341405d8524ade323de820f013a9e0e4fc462bfbc726efa982ba0c25716c66917aa6e2ed1aa03fadfd2d81a6bed6bdce9c4e89ff5f2ffb3e9de
|
@@ -14,13 +14,13 @@ class HotwireCombobox::Component
|
|
14
14
|
name_when_new: nil,
|
15
15
|
open: false,
|
16
16
|
options: [],
|
17
|
-
|
17
|
+
mobile_at: "640px",
|
18
18
|
value: nil,
|
19
19
|
**rest
|
20
20
|
@view, @autocomplete, @id, @name, @value, @form, @async_src,
|
21
|
-
@name_when_new, @open, @data, @
|
21
|
+
@name_when_new, @open, @data, @mobile_at, @options, @dialog_label =
|
22
22
|
view, autocomplete, id, name, value, form, async_src,
|
23
|
-
name_when_new, open, data,
|
23
|
+
name_when_new, open, data, mobile_at, options, dialog_label
|
24
24
|
|
25
25
|
@combobox_attrs = input.reverse_merge(rest).with_indifferent_access
|
26
26
|
@association_name = association_name || infer_association_name
|
@@ -136,7 +136,7 @@ class HotwireCombobox::Component
|
|
136
136
|
|
137
137
|
private
|
138
138
|
attr_reader :view, :autocomplete, :id, :name, :value, :form,
|
139
|
-
:name_when_new, :open, :data, :combobox_attrs, :
|
139
|
+
:name_when_new, :open, :data, :combobox_attrs, :mobile_at,
|
140
140
|
:association_name
|
141
141
|
|
142
142
|
def infer_association_name
|
@@ -147,13 +147,13 @@ class HotwireCombobox::Component
|
|
147
147
|
|
148
148
|
def fieldset_data
|
149
149
|
data.reverse_merge \
|
150
|
-
|
150
|
+
async_id: hidden_field_id,
|
151
151
|
controller: view.token_list("hw-combobox", data[:controller]),
|
152
152
|
hw_combobox_expanded_value: open,
|
153
153
|
hw_combobox_name_when_new_value: name_when_new,
|
154
154
|
hw_combobox_original_name_value: hidden_field_name,
|
155
155
|
hw_combobox_autocomplete_value: autocomplete,
|
156
|
-
hw_combobox_small_viewport_max_width_value:
|
156
|
+
hw_combobox_small_viewport_max_width_value: mobile_at,
|
157
157
|
hw_combobox_async_src_value: async_src,
|
158
158
|
hw_combobox_prefilled_display_value: prefilled_display,
|
159
159
|
hw_combobox_filterable_attribute_value: "data-filterable-as",
|
@@ -214,7 +214,7 @@ class HotwireCombobox::Component
|
|
214
214
|
click@window->hw-combobox#closeOnClickOutside
|
215
215
|
focusin@window->hw-combobox#closeOnFocusOutside".squish,
|
216
216
|
hw_combobox_target: "combobox",
|
217
|
-
|
217
|
+
async_id: hidden_field_id
|
218
218
|
end
|
219
219
|
|
220
220
|
def input_aria
|