Class: SolidusAdmin::UI::Table::Pagination::Component

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/solidus_admin/ui/table/pagination/component.rb

Instance Method Summary collapse

Constructor Details

#initialize(prev_link: nil, next_link: nil) ⇒ Component

Returns a new instance of Component.

Parameters:

  • prev_link (String) (defaults to: nil)

    The link to the previous page.

  • next_link (String) (defaults to: nil)

    The link to the next page.



6
7
8
9
# File 'app/components/solidus_admin/ui/table/pagination/component.rb', line 6

def initialize(prev_link: nil, next_link: nil)
  @prev_link = prev_link
  @next_link = next_link
end

Instance Method Details

#render?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/components/solidus_admin/ui/table/pagination/component.rb', line 11

def render?
  @prev_link.present? || @next_link.present?
end