Class: Blacklight::FacetFieldPaginationComponent
- Inherits:
-
Component
- Object
- ViewComponent::Base
- Component
- Blacklight::FacetFieldPaginationComponent
show all
- Defined in:
- app/components/blacklight/facet_field_pagination_component.rb
Constant Summary
Constants inherited
from Component
Component::EXCLUDE_VARIABLES
Instance Method Summary
collapse
Methods inherited from Component
compiler, config, #inspect
Constructor Details
Returns a new instance of FacetFieldPaginationComponent.
5
6
7
|
# File 'app/components/blacklight/facet_field_pagination_component.rb', line 5
def initialize(facet_field:)
@facet_field = facet_field
end
|
Instance Method Details
#param_name ⇒ Object
13
14
15
|
# File 'app/components/blacklight/facet_field_pagination_component.rb', line 13
def param_name
@facet_field.paginator.class.request_keys[:page]
end
|
#render? ⇒ Boolean
17
18
19
|
# File 'app/components/blacklight/facet_field_pagination_component.rb', line 17
def render?
@facet_field.paginator
end
|
#sort_facet_url(sort) ⇒ Object
9
10
11
|
# File 'app/components/blacklight/facet_field_pagination_component.rb', line 9
def sort_facet_url(sort)
@facet_field.paginator.params_for_resort_url(sort, @facet_field.search_state.to_h)
end
|