Class: PhlexKit::DataTableSelectionSummary
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::DataTableSelectionSummary
- Defined in:
- app/components/phlex_kit/data_table/data_table_selection_summary.rb
Overview
"N of M row(s) selected." line, kept current by the controller. See data_table.rb.
Instance Method Summary collapse
-
#initialize(total_on_page: 0, **attrs) ⇒ DataTableSelectionSummary
constructor
A new instance of DataTableSelectionSummary.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(total_on_page: 0, **attrs) ⇒ DataTableSelectionSummary
Returns a new instance of DataTableSelectionSummary.
5 6 7 8 |
# File 'app/components/phlex_kit/data_table/data_table_selection_summary.rb', line 5 def initialize(total_on_page: 0, **attrs) @total_on_page = total_on_page @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'app/components/phlex_kit/data_table/data_table_selection_summary.rb', line 10 def view_template div(**mix({ class: "pk-data-table-selection-summary", role: "status", # live region — selection changes are announced to AT data: { phlex_kit__data_table_target: "selectionSummary" } }, @attrs)) do plain "0 of #{@total_on_page} row(s) selected." end end |