Sha256: e6665b89197cc5faa207b620cbb2e4a4c18529128cda2248fcfc8d6fe5a859f3

Contents?: true

Size: 1.34 KB

Versions: 254

Compression:

Stored size: 1.34 KB

Contents

<%= pb_content_tag do %>
        <%= pb_rails("table/table_row", props: { tag: "div" }) do %>
            <% object.column_definitions.each_with_index do |item, index| %>
                <%= pb_rails("table/table_header", props: { tag: "div", id: item[:accessor], classname: object.th_classname, sort_menu: item[:sort_menu] }) do %>
                    <%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end", text_align: "end" }) do %>
                        <% if index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") %>
                            <button class="gray-icon toggle-all-icon" onclick="expandAllRows(this)">
                                <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
                            </button>
                        <% end %>
                        <%= item[:label] %>
                    <% end %>
                <% end %>
            <% end %>
        <% end %>
<% end %>

<script type="text/javascript">
    var expandAllRows = (element) => {
        element.closest('.pb_table').querySelectorAll('.pb_advanced_table_body > .pb_table_tr [data-advanced-table]').forEach((button) => {
            button.dispatchEvent(new Event('click'));
        });
    };
</script>

Version data entries

254 entries across 254 versions & 1 rubygems

Version Path
playbook_ui-14.3.2.pre.alpha.PBNTR515typeaheadmarginbottomredux3785 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.3.2.pre.alpha.revert3614PBNTR455ganttchartPOC3783 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.4.0.pre.rc.12 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.3.2.pre.alpha.play1472newicons3773 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.4.0.pre.rc.11 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.3.2.pre.alpha.PBNTR490multilevelselect3771 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.4.0.pre.rc.10 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.3.2.pre.alpha.PBNTR490multilevelselect3766 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.4.0.pre.rc.9 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.4.0.pre.rc.8 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.3.2.pre.alpha.PBNTR480radiocustomchildrenprop3759 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.3.2.pre.alpha.PBNTR515typeaheadmarginbottomredux3756 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.4.0.pre.rc.7 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.3.2 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.4.0.pre.rc.6 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.3.1.pre.alpha.PBNTR515typeaheadmarginbottomredux3750 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.3.1.pre.alpha.PBNTR515typeaheadmarginbottomredux3752 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.3.1.pre.alpha.PBNTR515typeaheadmarginbottomredux3751 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.3.1.pre.alpha.PBNTR515typeaheadmarginbottomredux3747 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.4.0.pre.rc.5 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb