hotwire_combobox 0.1.31 → 0.1.32

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: fad424ae43c806dbdd3225d794d2ddf769baebfb6f88d36f889740a166820b52
4
- data.tar.gz: bcfe583600ad08b2cbfa207bfcf0b987c34278e0f20b5db41b30d520d29248d3
3
+ metadata.gz: eb06e6c688920de5447b5fbea7fd20c242e228a7d335b8e9841cd07c7df03cb0
4
+ data.tar.gz: 338aad9ff496b0449e509543698c45b7581cbe9d6c13e869b25a86fa8819b726
5
5
  SHA512:
6
- metadata.gz: 042322c92228ec2e631e4ff82fbe093d4c1813a292eaa60792f06616a4d339af1983976dcd8d5788030176942a63831a8a534ad062d8f68df186af8b534ef8c3
7
- data.tar.gz: 615120f4220a603caf11b86b853c8498113d49d56d695195398cdd9e9c56abc7867a652810106fdcbddad55b23667b16f6d0048964efcb5a370e3f3bb54c9e35
6
+ metadata.gz: 84e88c954657e5f527ac5b564ff210ddeb42cd8e9dcb33a5ef40a9882d6edabbbe40fd53211a95b46056336399babf728bb11c7e5993dd845e2a8cbc86fe7b47
7
+ data.tar.gz: 9803e31d7244ec3b87d6a6e0dc3532db155f206a540c69d4ee07d586e5e781da0dc5a267e5fa9c8bd4394b006272cfa361d511fb48c29c4d37d7c9a03627107b
@@ -11,10 +11,10 @@ class HotwireCombobox::Component
11
11
  form: nil,
12
12
  id: nil,
13
13
  input: {},
14
+ mobile_at: "640px",
14
15
  name_when_new: nil,
15
16
  open: false,
16
17
  options: [],
17
- mobile_at: "640px",
18
18
  value: nil,
19
19
  **rest
20
20
  @view, @autocomplete, @id, @name, @value, @form, @async_src,
@@ -46,6 +46,9 @@ module HotwireCombobox
46
46
  end
47
47
  hw_alias :hw_paginated_combobox_options
48
48
 
49
+ alias_method :hw_async_combobox_options, :hw_paginated_combobox_options
50
+ hw_alias :hw_async_combobox_options
51
+
49
52
  protected # library use only
50
53
  def hw_listbox_options_id(id)
51
54
  "#{id}-hw-listbox__options"
@@ -55,6 +58,16 @@ module HotwireCombobox
55
58
  "#{id}__hw_combobox_pagination"
56
59
  end
57
60
 
61
+ def hw_combobox_next_page_uri(uri, next_page)
62
+ if next_page
63
+ hw_uri_with_params uri, page: next_page, q: params[:q], format: :turbo_stream
64
+ end
65
+ end
66
+
67
+ def hw_combobox_page_stream_action
68
+ params[:page] ? :append : :update
69
+ end
70
+
58
71
  private
59
72
  def hw_extract_options_and_src(options_or_src, render_in)
60
73
  if options_or_src.is_a? String
@@ -96,15 +109,5 @@ module HotwireCombobox
96
109
  object.public_send method_or_proc
97
110
  end
98
111
  end
99
-
100
- def hw_combobox_next_page_uri(uri, next_page)
101
- if next_page
102
- hw_uri_with_params uri, page: next_page, q: params[:q], format: :turbo_stream
103
- end
104
- end
105
-
106
- def hw_combobox_page_stream_action
107
- params[:page] ? :append : :update
108
- end
109
112
  end
110
113
  end
@@ -1,3 +1,3 @@
1
1
  module HotwireCombobox
2
- VERSION = "0.1.31"
2
+ VERSION = "0.1.32"
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.1.31
4
+ version: 0.1.32
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-02-07 00:00:00.000000000 Z
11
+ date: 2024-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails