Sha256: 7abc0bf19033430b2978ff4f0bb40b2d60988cb22b2108a46f2a0fc631f3259d

Contents?: true

Size: 1.3 KB

Versions: 15

Compression:

Stored size: 1.3 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}) 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

15 entries across 15 versions & 1 rubygems

Version Path
playbook_ui-13.30.0.pre.alpha.PBNTR353draggablev53136 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.30.0.pre.alpha.PLAY1328fixtimelinekitglobalpropsreact3096 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.30.0 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.29.0.pre.alpha.removeduplicatekitexampleclass3063 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.29.0.pre.alpha.PBNTR329draggablev33060 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.29.0.pre.alpha.PBNTR329draggablev33059 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.29.0.pre.alpha.testingcollapsibleissue3052 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.29.0 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.28.0.pre.alpha.PBNTR297gradientoverlay3029 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.28.0.pre.alpha.pbntr312tableheaderflexremoval3019 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.28.0.pre.alpha.dialogturbostreameventlistener3017 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.28.0.pre.alpha.PLAY1338alpha3001 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2987 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2986 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2984 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb