Class: Blacklight::FacetFieldPaginationComponent
- Inherits:
-
Component
- Object
- ViewComponent::Base
- Component
- Blacklight::FacetFieldPaginationComponent
show all
- Defined in:
- app/components/blacklight/facet_field_pagination_component.rb
Instance Method Summary
collapse
Methods inherited from Component
reset_compiler!, sidecar_files, upstream_sidecar_files
Constructor Details
#initialize(facet_field:, button_classes: %w[btn btn-outline-secondary])) ⇒ FacetFieldPaginationComponent
Returns a new instance of FacetFieldPaginationComponent.
5
6
7
8
|
# File 'app/components/blacklight/facet_field_pagination_component.rb', line 5
def initialize(facet_field:, button_classes: %w[btn btn-outline-secondary])
@facet_field = facet_field
@button_classes = button_classes.join(' ')
end
|
Instance Method Details
#param_name ⇒ Object
14
15
16
|
# File 'app/components/blacklight/facet_field_pagination_component.rb', line 14
def param_name
@facet_field.paginator.class.request_keys[:page]
end
|
#render? ⇒ Boolean
18
19
20
|
# File 'app/components/blacklight/facet_field_pagination_component.rb', line 18
def render?
@facet_field.paginator
end
|
#sort_facet_url(sort) ⇒ Object
10
11
12
|
# File 'app/components/blacklight/facet_field_pagination_component.rb', line 10
def sort_facet_url(sort)
@facet_field.paginator.params_for_resort_url(sort, @facet_field.search_state.to_h)
end
|