hotwire_combobox 0.1.30 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4893ac34075f430aae8ba9b29af13ef5338bf978c55147c661b372e5f19b5d57
4
- data.tar.gz: 38b85aecdc36491ff46d073736dbf8613fc0b6457bd1ef6ed6b3e8819510665f
3
+ metadata.gz: fad424ae43c806dbdd3225d794d2ddf769baebfb6f88d36f889740a166820b52
4
+ data.tar.gz: bcfe583600ad08b2cbfa207bfcf0b987c34278e0f20b5db41b30d520d29248d3
5
5
  SHA512:
6
- metadata.gz: f8c578b4daeafe222b0b22f8b826ba1600f0b853f4daad6e5bba70374318a32e866975a607c5820dd2c626f3cac383e9aa28b8febead4059bbaba32315653a1d
7
- data.tar.gz: 9591dc2130c1574ee2afd95c0483e172028fa68bc0cbfed88d0dfc8aa3f6c50fdaa53e50dbaa35eac2dac75da85c3e80aaaf8051484bdf4cc08738cd2bdc5836
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: hidden_field_id, src: async_src }
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: hidden_field_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 hidden_field_id
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
- "#{hidden_field_id}-hw-combobox"
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: hidden_field_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
- "#{hidden_field_id}-hw-listbox"
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
- "#{hidden_field_id}-hw-dialog-combobox"
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
- "#{hidden_field_id}-hw-dialog-listbox"
292
+ "#{canonical_id}-hw-dialog-listbox"
288
293
  end
289
294
 
290
295
  def dialog_listbox_data
@@ -1,3 +1,3 @@
1
1
  module HotwireCombobox
2
- VERSION = "0.1.30"
2
+ VERSION = "0.1.31"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotwire_combobox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.30
4
+ version: 0.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Farias