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 +4 -4
- data/app/presenters/hotwire_combobox/component.rb +1 -1
- data/lib/hotwire_combobox/helper.rb +13 -10
- data/lib/hotwire_combobox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eb06e6c688920de5447b5fbea7fd20c242e228a7d335b8e9841cd07c7df03cb0
|
|
4
|
+
data.tar.gz: 338aad9ff496b0449e509543698c45b7581cbe9d6c13e869b25a86fa8819b726
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
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.
|
|
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-
|
|
11
|
+
date: 2024-02-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|