turbo-scroll 0.1.3 → 0.1.4
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/README.md +71 -40
- data/lib/locales/en.yml +1 -0
- data/lib/locales/fr.yml +1 -0
- data/lib/locales/nl.yml +1 -0
- data/lib/locales/ro.yml +1 -0
- data/lib/locales/vn.yml +1 -0
- data/lib/turbo-scroll/auto.html.slim +5 -0
- data/lib/turbo-scroll/auto.rb +32 -0
- data/lib/turbo-scroll/{loader.scss → auto.scss} +0 -0
- data/lib/turbo-scroll/auto_stream.html.slim +7 -0
- data/lib/turbo-scroll/auto_stream.rb +17 -0
- data/lib/turbo-scroll/more.html.slim +12 -0
- data/lib/turbo-scroll/{loader.rb → more.rb} +4 -4
- data/lib/turbo-scroll/more_stream.html.slim +5 -0
- data/lib/turbo-scroll/more_stream.rb +16 -0
- data/lib/turbo-scroll/railtie.rb +4 -2
- data/lib/turbo-scroll/spin_loader.rb +2 -8
- data/lib/turbo-scroll/version.rb +1 -1
- data/lib/turbo-scroll.rb +35 -4
- metadata +19 -16
- data/lib/tasks/turbo_scroll_tasks.rake +0 -4
- data/lib/turbo-scroll/loader.html.slim +0 -4
- data/lib/turbo-scroll/update.html.slim +0 -5
- data/lib/turbo-scroll/update.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e965fd74ecaa27efa5443fd7c585381a5e10a03c1b30ae5ab3ded35bd658ccdc
|
4
|
+
data.tar.gz: 991df0ca43b6e75535a7994b51fc68b01773e1d420bda91cf847f65a8f88213f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8e69ff2b35a7f55edbd879cad95f5ed25a73b0d0a173bc5e18de0e8e6979dc8aaa834acc2e971799fac4a41bbedc072fa6ee9ab05411a2cbb963bb3e2266de4
|
7
|
+
data.tar.gz: 43a7739af26ba8aa9ed34661150906186be692447723b0b7462ef43144a70cc8cad2e6f2af92936f17bcf8c239801dcd3f32e01787f3b1f3854c0446459a90db
|
data/README.md
CHANGED
@@ -35,13 +35,33 @@ end
|
|
35
35
|
|
36
36
|
### index.html.erb|slim
|
37
37
|
|
38
|
-
|
38
|
+
The simplest is to use the `turbo_scroll_auto` helper and
|
39
|
+
nest inside your initial infinite content. This will wrap the
|
40
|
+
content with an element with id #infinite that will be
|
41
|
+
used to append new content to for infinite scrolling.
|
42
|
+
|
43
|
+
|
44
|
+
```slim
|
45
|
+
= turbo_scroll_auto page: @articles.next_page_index
|
46
|
+
- @articles.each do |article|
|
47
|
+
= article
|
48
|
+
```
|
49
|
+
|
50
|
+
Alternatively, in your index page, make sure you have a DOM element with ID `infinite`
|
39
51
|
and render inside of it your initial page content.
|
40
52
|
|
41
53
|
At the bottom of your page, add the infinite scrolling loader
|
42
|
-
by calling the `
|
54
|
+
by calling the `turbo_scroll_auto` helper and passing the next page index
|
43
55
|
if a next page is present.
|
44
56
|
|
57
|
+
```slim
|
58
|
+
#infinite
|
59
|
+
- @articles.each do |article|
|
60
|
+
= article
|
61
|
+
|
62
|
+
= turbo_scroll_auto page: @articles.next_page_index
|
63
|
+
```
|
64
|
+
|
45
65
|
This gem currently assumes that the page parameter is called `page`, so in
|
46
66
|
your controller make sure you use that parameter for selecting
|
47
67
|
the records for a given page.
|
@@ -51,23 +71,11 @@ When the loader component becomes visible, it will do 2 things
|
|
51
71
|
- append the next page to the #infinite dom id
|
52
72
|
- update the loader to load the next page (when present)
|
53
73
|
|
54
|
-
#### Slim Example
|
55
|
-
|
56
|
-
```slim
|
57
|
-
#infinite
|
58
|
-
/ render your page fragment here in whatever structure you desire
|
59
|
-
/ and extract it into a partial or a component to avoid repition, if desired.
|
60
|
-
- @articles.each do |article|
|
61
|
-
= article
|
62
|
-
|
63
|
-
= turbo_scroll_loader(page: @articles.next_page_index)
|
64
|
-
```
|
65
|
-
|
66
74
|
If you want to use a different ID, you'll have to pass it on in turbo_stream response.
|
67
75
|
|
68
76
|
### index.turbo_stream.erb|slim
|
69
77
|
|
70
|
-
Your turbo_stream response can use the `
|
78
|
+
Your turbo_stream response can use the `turbo_scroll_auto_stream` helper to
|
71
79
|
append the next page content and update the current loader with a
|
72
80
|
loader for the next page.
|
73
81
|
|
@@ -75,27 +83,43 @@ When using the [next-pageable](https://github.com/allcrux/next-pageable) gem
|
|
75
83
|
the next_page_index is already present on the collection when a next page exists.
|
76
84
|
|
77
85
|
```slim
|
78
|
-
=
|
79
|
-
/ render your page fragment here in whatever structure you desire
|
80
|
-
/ and extract it into a partial or a component to avoid repition, if desired.
|
86
|
+
= turbo_scroll_auto_stream page: @articles.next_page_index
|
81
87
|
- @articles.each do |article|
|
82
88
|
= article
|
83
89
|
```
|
84
90
|
|
91
|
+
### More variant (no auto loading, just simple 'more' loading)
|
92
|
+
|
93
|
+
```slim
|
94
|
+
= turbo_scroll_more page: @articles.next_page_index
|
95
|
+
= render(Articles::Row.with_collection(@articles))
|
96
|
+
```
|
97
|
+
|
98
|
+
Your turbo_stream response can use the `turbo_scroll_more_stream` helper to
|
99
|
+
append the next page content and update the current more loader with a
|
100
|
+
more loader for the next page.
|
101
|
+
|
102
|
+
articles\index.turbo_stream.slim
|
103
|
+
|
104
|
+
```slim
|
105
|
+
= turbo_scroll_more_stream page: @articles.next_page_index
|
106
|
+
= render Articles::Row.with_collection(@articles)
|
107
|
+
```
|
108
|
+
|
85
109
|
### An HTML table alternative for table layouts using CSS grids
|
86
110
|
|
87
111
|
As HTML is pretty picky on the tags allowed inside 'table', 'tr', 'td', etc you
|
88
112
|
can consider using CSS grid as an alternative.
|
89
113
|
|
90
114
|
```css
|
91
|
-
.
|
115
|
+
.article.row {
|
92
116
|
display: grid;
|
93
117
|
grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 8fr) minmax(0, 2fr) minmax(0, 1fr) 3em;
|
94
118
|
max-width: 100%;
|
95
119
|
width: 100%;
|
96
120
|
}
|
97
121
|
|
98
|
-
.
|
122
|
+
.article.row .col {
|
99
123
|
height: 2.75rem;
|
100
124
|
display: flex;
|
101
125
|
align-items: center;
|
@@ -104,34 +128,43 @@ can consider using CSS grid as an alternative.
|
|
104
128
|
padding-right: 0.5rem;
|
105
129
|
}
|
106
130
|
|
107
|
-
.
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
.
|
112
|
-
|
131
|
+
.article.row .col-head {
|
132
|
+
font-weight: bolder;
|
133
|
+
}
|
134
|
+
|
135
|
+
.article.row .col-filter {
|
136
|
+
padding-left: 0rem;
|
137
|
+
padding-right: 0rem;
|
138
|
+
}
|
139
|
+
|
140
|
+
.article.row .align-right {
|
141
|
+
justify-content: right;
|
142
|
+
}
|
143
|
+
|
144
|
+
.article.row.striped:nth-child(2n+1) {
|
113
145
|
background-color: #EEEEEE;
|
114
146
|
}
|
115
147
|
```
|
116
148
|
|
117
149
|
which would go hand in hand with this partial for a record row
|
118
150
|
|
119
|
-
```
|
120
|
-
.
|
121
|
-
.col
|
122
|
-
.col
|
123
|
-
.col
|
124
|
-
.col
|
125
|
-
.col.
|
126
|
-
|
127
|
-
|
151
|
+
```slim
|
152
|
+
.article.row.striped
|
153
|
+
.col = article.articlenumber
|
154
|
+
.col = article.barcode
|
155
|
+
.col = article.description
|
156
|
+
.col = article.supplier
|
157
|
+
.col.align-right = article.price.print
|
158
|
+
.col.align-right
|
159
|
+
a.btn.btn-sm.btn-secondary href=edit_article_path(article)
|
160
|
+
i.bi.bi-pencil
|
128
161
|
```
|
129
162
|
|
130
163
|
|
131
164
|
### Using a different DOM ID
|
132
165
|
|
133
166
|
In case you want or need to use a different DOM ID you
|
134
|
-
can pass it on as an extra param to the `
|
167
|
+
can pass it on as an extra param to the `turbo_scroll_auto_stream` helper.
|
135
168
|
|
136
169
|
The below example illustrates this for the case where your
|
137
170
|
DOM ID is `#scroll`.
|
@@ -139,17 +172,15 @@ DOM ID is `#scroll`.
|
|
139
172
|
index.html.slim
|
140
173
|
|
141
174
|
```slim
|
142
|
-
|
175
|
+
= turbo_scroll_auto page: @articles.next_page_index, id: :scroll
|
143
176
|
- @articles.each do |article|
|
144
177
|
= article
|
145
|
-
|
146
|
-
= turbo_scroll_loader(page: @articles.next_page_index)
|
147
178
|
```
|
148
179
|
|
149
180
|
index.turbo_stream.slim
|
150
181
|
|
151
182
|
```slim
|
152
|
-
=
|
183
|
+
= turbo_scroll_auto_stream page: @articles.next_page_index, infinite_dom_id: :scroll
|
153
184
|
- @articles.each do |article|
|
154
185
|
= article
|
155
186
|
```
|
data/lib/locales/en.yml
CHANGED
data/lib/locales/fr.yml
CHANGED
data/lib/locales/nl.yml
CHANGED
data/lib/locales/ro.yml
CHANGED
data/lib/locales/vn.yml
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "turbo-rails"
|
4
|
+
|
5
|
+
class TurboScroll::Auto < ViewComponent::Base
|
6
|
+
include Turbo::FramesHelper
|
7
|
+
|
8
|
+
attr_reader :page, :loader_dom_id, :loading_indicator
|
9
|
+
|
10
|
+
def initialize(page:, loader_dom_id: :loader, loading_indicator: true)
|
11
|
+
@page = page
|
12
|
+
@loader_dom_id = loader_dom_id
|
13
|
+
@loading_indicator = loading_indicator
|
14
|
+
end
|
15
|
+
|
16
|
+
def query_params
|
17
|
+
@query_params ||=
|
18
|
+
request.query_parameters.except(:page, :raw, :format)
|
19
|
+
end
|
20
|
+
|
21
|
+
def next_page_path
|
22
|
+
url_for(page: page, **query_params)
|
23
|
+
end
|
24
|
+
|
25
|
+
def next_page_stream_path
|
26
|
+
url_for(format: :turbo_stream, page: page, **query_params)
|
27
|
+
end
|
28
|
+
|
29
|
+
def render?
|
30
|
+
page
|
31
|
+
end
|
32
|
+
end
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "turbo-rails"
|
4
|
+
|
5
|
+
class TurboScroll::AutoStream < ViewComponent::Base
|
6
|
+
include Turbo::FramesHelper
|
7
|
+
include Turbo::StreamsHelper
|
8
|
+
|
9
|
+
attr_reader :page, :loader_dom_id, :infinite_dom_id, :loading_indicator
|
10
|
+
|
11
|
+
def initialize(page:, loader_dom_id: :loader, loading_indicator:, infinite_dom_id: :infinite)
|
12
|
+
@page = page
|
13
|
+
@infinite_dom_id = infinite_dom_id
|
14
|
+
@loading_indicator = loading_indicator
|
15
|
+
@loader_dom_id = loader_dom_id
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
turbo-frame id=loader_dom_id
|
2
|
+
a.more href=next_page_path onclick="more('#{next_page_stream_path}')" =I18n.t(".more")
|
3
|
+
|
4
|
+
javascript:
|
5
|
+
function more(url) {
|
6
|
+
event.preventDefault();
|
7
|
+
fetch(url)
|
8
|
+
.then(response => response.text())
|
9
|
+
.then(html => Turbo.renderStreamMessage(html))
|
10
|
+
.catch(error => console.warn('Something went wrong.', error));
|
11
|
+
}
|
12
|
+
|
@@ -2,14 +2,14 @@
|
|
2
2
|
|
3
3
|
require "turbo-rails"
|
4
4
|
|
5
|
-
class TurboScroll::
|
5
|
+
class TurboScroll::More < ViewComponent::Base
|
6
6
|
include Turbo::FramesHelper
|
7
7
|
|
8
|
-
attr_reader :page, :
|
8
|
+
attr_reader :page, :loader_dom_id
|
9
9
|
|
10
|
-
def initialize(page:,
|
10
|
+
def initialize(page:, loader_dom_id: :loader)
|
11
11
|
@page = page
|
12
|
-
@
|
12
|
+
@loader_dom_id = loader_dom_id
|
13
13
|
end
|
14
14
|
|
15
15
|
def query_params
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "turbo-rails"
|
4
|
+
|
5
|
+
class TurboScroll::MoreStream < ViewComponent::Base
|
6
|
+
include Turbo::FramesHelper
|
7
|
+
include Turbo::StreamsHelper
|
8
|
+
|
9
|
+
attr_reader :page, :loader_dom_id, :infinite_dom_id
|
10
|
+
|
11
|
+
def initialize(page:, loader_dom_id: :loader, infinite_dom_id: :infinite)
|
12
|
+
@page = page
|
13
|
+
@loader_dom_id = loader_dom_id
|
14
|
+
@infinite_dom_id = infinite_dom_id
|
15
|
+
end
|
16
|
+
end
|
data/lib/turbo-scroll/railtie.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
module TurboScroll
|
2
2
|
class Railtie < ::Rails::Railtie
|
3
3
|
initializer "turbo-scrolls.load_components" do
|
4
|
-
require_relative "
|
5
|
-
require_relative "
|
4
|
+
require_relative "auto"
|
5
|
+
require_relative "auto_stream"
|
6
|
+
require_relative "more"
|
7
|
+
require_relative "more_stream"
|
6
8
|
require_relative "spin_loader"
|
7
9
|
end
|
8
10
|
initializer "turbo-scrolls.view_helpers" do |app|
|
@@ -3,13 +3,7 @@
|
|
3
3
|
require "turbo-rails"
|
4
4
|
|
5
5
|
class TurboScroll::SpinLoader < ViewComponent::Base
|
6
|
-
|
7
|
-
|
8
|
-
def initialize(loading_indicator: true)
|
9
|
-
@loading_indicator = loading_indicator
|
10
|
-
end
|
11
|
-
|
12
|
-
def render?
|
13
|
-
loading_indicator
|
6
|
+
#
|
7
|
+
def initialize()
|
14
8
|
end
|
15
9
|
end
|
data/lib/turbo-scroll/version.rb
CHANGED
data/lib/turbo-scroll.rb
CHANGED
@@ -3,19 +3,50 @@ require "turbo-scroll/railtie" if defined?(Rails::Railtie)
|
|
3
3
|
|
4
4
|
module TurboScroll
|
5
5
|
module ViewHelpers
|
6
|
-
|
7
|
-
|
6
|
+
|
7
|
+
#
|
8
|
+
def turbo_scroll_auto(page:, loader_dom_id: :loader, loading_indicator: true, id: :infinite, &block)
|
9
|
+
if block_given?
|
10
|
+
safe_concat(%{<div id="#{id}">})
|
11
|
+
concat(capture(&block))
|
12
|
+
safe_concat("</div>")
|
13
|
+
end
|
14
|
+
render(TurboScroll::Auto.new(page: page, loader_dom_id: loader_dom_id, loading_indicator: loading_indicator))
|
15
|
+
end
|
16
|
+
|
17
|
+
#
|
18
|
+
def turbo_scroll_more(page:, loader_dom_id: :loader, id: :infinite, &block)
|
19
|
+
if block_given?
|
20
|
+
safe_concat(%{<div id="#{id}">})
|
21
|
+
concat(capture(&block))
|
22
|
+
safe_concat("</div>")
|
23
|
+
end
|
24
|
+
render(TurboScroll::More.new(page: page, loader_dom_id: loader_dom_id))
|
8
25
|
end
|
9
26
|
|
10
|
-
|
27
|
+
#
|
28
|
+
def turbo_scroll_auto_stream(page:, loader_dom_id: :loader, infinite_dom_id: :infinite, loading_indicator: true, &block)
|
11
29
|
render(
|
12
|
-
TurboScroll::
|
30
|
+
TurboScroll::AutoStream.new(
|
13
31
|
page: page,
|
32
|
+
loader_dom_id: loader_dom_id,
|
14
33
|
infinite_dom_id: infinite_dom_id,
|
15
34
|
loading_indicator: loading_indicator
|
16
35
|
),
|
17
36
|
&block
|
18
37
|
)
|
19
38
|
end
|
39
|
+
|
40
|
+
#
|
41
|
+
def turbo_scroll_more_stream(page:, loader_dom_id: :loader, infinite_dom_id: :infinite, &block)
|
42
|
+
render(
|
43
|
+
TurboScroll::MoreStream.new(
|
44
|
+
page: page,
|
45
|
+
loader_dom_id: loader_dom_id,
|
46
|
+
infinite_dom_id: infinite_dom_id
|
47
|
+
),
|
48
|
+
&block
|
49
|
+
)
|
50
|
+
end
|
20
51
|
end
|
21
52
|
end
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbo-scroll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koen handekyn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '6'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: turbo-rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: view_component
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '2'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: slim
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '4'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '4'
|
69
69
|
description: TurboScroll is a minimalistic gem that provides infinite scrolling for
|
@@ -82,16 +82,19 @@ files:
|
|
82
82
|
- lib/locales/nl.yml
|
83
83
|
- lib/locales/ro.yml
|
84
84
|
- lib/locales/vn.yml
|
85
|
-
- lib/tasks/turbo_scroll_tasks.rake
|
86
85
|
- lib/turbo-scroll.rb
|
87
|
-
- lib/turbo-scroll/
|
88
|
-
- lib/turbo-scroll/
|
89
|
-
- lib/turbo-scroll/
|
86
|
+
- lib/turbo-scroll/auto.html.slim
|
87
|
+
- lib/turbo-scroll/auto.rb
|
88
|
+
- lib/turbo-scroll/auto.scss
|
89
|
+
- lib/turbo-scroll/auto_stream.html.slim
|
90
|
+
- lib/turbo-scroll/auto_stream.rb
|
91
|
+
- lib/turbo-scroll/more.html.slim
|
92
|
+
- lib/turbo-scroll/more.rb
|
93
|
+
- lib/turbo-scroll/more_stream.html.slim
|
94
|
+
- lib/turbo-scroll/more_stream.rb
|
90
95
|
- lib/turbo-scroll/railtie.rb
|
91
96
|
- lib/turbo-scroll/spin_loader.rb
|
92
97
|
- lib/turbo-scroll/spin_loader.slim
|
93
|
-
- lib/turbo-scroll/update.html.slim
|
94
|
-
- lib/turbo-scroll/update.rb
|
95
98
|
- lib/turbo-scroll/version.rb
|
96
99
|
homepage: https://github.com/allcrux/turbo-scroll
|
97
100
|
licenses:
|
data/lib/turbo-scroll/update.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "turbo-rails"
|
4
|
-
|
5
|
-
class TurboScroll::Update < ViewComponent::Base
|
6
|
-
include Turbo::FramesHelper
|
7
|
-
include Turbo::StreamsHelper
|
8
|
-
|
9
|
-
attr_reader :page, :infinite_dom_id, :loading_indicator
|
10
|
-
|
11
|
-
def initialize(page:, loading_indicator:, infinite_dom_id: :infinite)
|
12
|
-
@page = page
|
13
|
-
@infinite_dom_id = infinite_dom_id
|
14
|
-
@loading_indicator = loading_indicator
|
15
|
-
end
|
16
|
-
end
|