hotwire_combobox 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7895a50977941ed0bb1de0a39c1fce94e0852d00ca19e3727e39de8906c1195f
4
- data.tar.gz: cb25d8a8466aa4f0d744c071532e23070d6dbdda12913d778d7591b8d3a9f6e4
3
+ metadata.gz: fb0eaf3c6593f518473d24ffdb931dc2519adc97c74eb4539055920c3ffd5ef9
4
+ data.tar.gz: 888c826e85dc6e77b601c89fc4a573a3f45706e51203aadc7edc14b431a50245
5
5
  SHA512:
6
- metadata.gz: 2a76bda92289fa0213210ba83668ed8f3e965fbfa90f8624d1f28e87d727a5a282eb417a16fd5c7b9cc81295d95f22802763f1e15dcd348fcc6ad854b00534f6
7
- data.tar.gz: 1c6ae0f949b507cb068bf8df011cab34442628fb9829c52edb99037f857d25b605125ce20c1e09936be1ff65c744b56d88c602f39dc31e3b2629b769fc804ec0
6
+ metadata.gz: 5c2725f7a89aff33a4fa649e37f03f363c28fab51ca930337593897068c5c60732568f8fb6b43e8c7f9cdc9309fdea9dd55298baed2774c50dc0e6041c59b989
7
+ data.tar.gz: b63c3b6031f3d74190115f5f01152085491125bc5ee0a721c3c1cb0be493993f3dec83b8132424bd471b93ff36f6b248f7f27d0abb34a3821959b6b9a2900fe7
@@ -1,5 +1,5 @@
1
1
  /*!
2
- HotwireCombobox 0.3.0
2
+ HotwireCombobox 0.3.1
3
3
  */
4
4
  import { Controller } from '@hotwired/stimulus';
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- HotwireCombobox 0.3.0
2
+ HotwireCombobox 0.3.1
3
3
  */
4
4
  (function (global, factory) {
5
5
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@hotwired/stimulus')) :
@@ -46,7 +46,7 @@ module HotwireCombobox::Component::Customizable
46
46
  custom = custom_attrs[element]
47
47
 
48
48
  coalesce = ->(key, value) do
49
- if value.is_a?(String) || value.is_a?(Array)
49
+ if custom.has_key?(key) && (value.is_a?(String) || value.is_a?(Array))
50
50
  view.token_list(value, custom.delete(key))
51
51
  else
52
52
  value
@@ -204,9 +204,9 @@ class HotwireCombobox::Component
204
204
  def name_when_new_on_multiselect_must_match_original_name
205
205
  return unless multiselect? && name_when_new.present?
206
206
 
207
- unless name_when_new.to_s == name
207
+ unless name_when_new.to_s == hidden_field_name
208
208
  errors.add :name_when_new, :must_match_original_name,
209
- message: "must match the regular name ('#{name}', in this case) on multiselect comboboxes."
209
+ message: "must match the regular name ('#{hidden_field_name}', in this case) on multiselect comboboxes."
210
210
  end
211
211
  end
212
212
 
@@ -1,3 +1,3 @@
1
1
  module HotwireCombobox
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotwire_combobox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Farias
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-04 00:00:00.000000000 Z
11
+ date: 2024-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubygems_version: 3.5.9
147
+ rubygems_version: 3.5.10
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Accessible Autocomplete for Rails apps