Class: PhlexKit::DataTableSelectAllCheckbox
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::DataTableSelectAllCheckbox
- Defined in:
- app/components/phlex_kit/data_table/data_table_select_all_checkbox.rb
Overview
Header checkbox selecting every DataTableRowCheckbox on the page (the controller sets indeterminate for partial selections). See data_table.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ DataTableSelectAllCheckbox
constructor
A new instance of DataTableSelectAllCheckbox.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ DataTableSelectAllCheckbox
Returns a new instance of DataTableSelectAllCheckbox.
5 6 7 |
# File 'app/components/phlex_kit/data_table/data_table_select_all_checkbox.rb', line 5 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/components/phlex_kit/data_table/data_table_select_all_checkbox.rb', line 9 def view_template render Checkbox.new(**mix({ aria: { label: "Select all" }, data: { phlex_kit__data_table_target: "selectAll", action: "change->phlex-kit--data-table#toggleAll" } }, @attrs)) end |