Method: Playbook::PbAdvancedTable::TableHeader#render_select_all_header

Defined in:
app/pb_kits/playbook/pb_advanced_table/table_header.rb

#render_select_all_headerObject

Selectable Rows No Subrows - checkboxes in their own first cell



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'app/pb_kits/playbook/pb_advanced_table/table_header.rb', line 50

def render_select_all_header
  if selectable_rows
    additional_classes = []
    additional_classes << "table-header-cells-custom"
    additional_classes << "header-cells-with-actions" if show_actions_bar
    additional_classes << "checkbox-cell-header"
    additional_classes << "pinned-left" if responsive == "scroll"
    pb_rails("table/table_header", props: {
               classname: additional_classes.join(" "),
             }) do
      pb_rails("checkbox", props: {
                 id: "#{table_id ? "#{table_id}-" : ''}select-all-rows",
                 indeterminate_main: true,
                 indeterminate_main_labels: ["", ""],
                 name: "#{table_id ? "#{table_id}-" : ''}select-all-rows",
               })
    end
  end
end