hotwire_combobox 0.1.30 → 0.1.31
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 +13 -8
- 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: fad424ae43c806dbdd3225d794d2ddf769baebfb6f88d36f889740a166820b52
|
4
|
+
data.tar.gz: bcfe583600ad08b2cbfa207bfcf0b987c34278e0f20b5db41b30d520d29248d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 042322c92228ec2e631e4ff82fbe093d4c1813a292eaa60792f06616a4d339af1983976dcd8d5788030176942a63831a8a534ad062d8f68df186af8b534ef8c3
|
7
|
+
data.tar.gz: 615120f4220a603caf11b86b853c8498113d49d56d695195398cdd9e9c56abc7867a652810106fdcbddad55b23667b16f6d0048964efcb5a370e3f3bb54c9e35
|
@@ -137,7 +137,7 @@ class HotwireCombobox::Component
|
|
137
137
|
end
|
138
138
|
|
139
139
|
def pagination_attrs
|
140
|
-
{ for_id:
|
140
|
+
{ for_id: canonical_id, src: async_src }
|
141
141
|
end
|
142
142
|
|
143
143
|
private
|
@@ -153,7 +153,7 @@ class HotwireCombobox::Component
|
|
153
153
|
|
154
154
|
def fieldset_data
|
155
155
|
data.reverse_merge \
|
156
|
-
async_id:
|
156
|
+
async_id: canonical_id,
|
157
157
|
controller: view.token_list("hw-combobox", data[:controller]),
|
158
158
|
hw_combobox_expanded_value: open,
|
159
159
|
hw_combobox_name_when_new_value: name_when_new,
|
@@ -186,10 +186,15 @@ class HotwireCombobox::Component
|
|
186
186
|
end
|
187
187
|
|
188
188
|
|
189
|
-
def
|
189
|
+
def canonical_id
|
190
190
|
id || form&.field_id(name)
|
191
191
|
end
|
192
192
|
|
193
|
+
|
194
|
+
def hidden_field_id
|
195
|
+
"#{canonical_id}-hw-hidden-field"
|
196
|
+
end
|
197
|
+
|
193
198
|
def hidden_field_name
|
194
199
|
form&.field_name(name) || name
|
195
200
|
end
|
@@ -204,7 +209,7 @@ class HotwireCombobox::Component
|
|
204
209
|
|
205
210
|
|
206
211
|
def input_id
|
207
|
-
|
212
|
+
canonical_id
|
208
213
|
end
|
209
214
|
|
210
215
|
def input_type
|
@@ -220,7 +225,7 @@ class HotwireCombobox::Component
|
|
220
225
|
click@window->hw-combobox#closeOnClickOutside
|
221
226
|
focusin@window->hw-combobox#closeOnFocusOutside".squish,
|
222
227
|
hw_combobox_target: "combobox",
|
223
|
-
async_id:
|
228
|
+
async_id: canonical_id
|
224
229
|
end
|
225
230
|
|
226
231
|
def input_aria
|
@@ -241,7 +246,7 @@ class HotwireCombobox::Component
|
|
241
246
|
|
242
247
|
|
243
248
|
def listbox_id
|
244
|
-
"#{
|
249
|
+
"#{canonical_id}-hw-listbox"
|
245
250
|
end
|
246
251
|
|
247
252
|
def listbox_data
|
@@ -262,7 +267,7 @@ class HotwireCombobox::Component
|
|
262
267
|
end
|
263
268
|
|
264
269
|
def dialog_input_id
|
265
|
-
"#{
|
270
|
+
"#{canonical_id}-hw-dialog-combobox"
|
266
271
|
end
|
267
272
|
|
268
273
|
def dialog_input_data
|
@@ -284,7 +289,7 @@ class HotwireCombobox::Component
|
|
284
289
|
end
|
285
290
|
|
286
291
|
def dialog_listbox_id
|
287
|
-
"#{
|
292
|
+
"#{canonical_id}-hw-dialog-listbox"
|
288
293
|
end
|
289
294
|
|
290
295
|
def dialog_listbox_data
|