Sha256: 2c30fe2e96fd1cef625d2480660260146c058428d54c7004be4a2b61af7c3589

Contents?: true

Size: 1.76 KB

Versions: 269

Compression:

Stored size: 1.76 KB

Contents

<%= content_tag(:div,
      aria: object.aria,
      class: object.classname,
      data: object.data,
      id: object.id) do %>
        <% object.column_definitions.each_with_index do |column, index| %>
            <%= pb_rails("table/table_cell", props: { tag: "div", classname: object.td_classname}) do %>
                <%= pb_rails("flex", props:{ align: "center", justify: "start" }) do %>
                    <div style="padding-left: <%= depth * 1.25 %>em">
                        <%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
                            <% if index.zero? && object.row[:children].present? %>
                                <button class="gray-icon toggle-all-icon" onclick="expandAllSubRows(this, <%= depth %>)">
                                    <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right:"xs" }) %>
                                </button>
                            <% end %>
                            <%= pb_rails("flex/flex_item") do %>
                                <% if index.zero? %>
                                    <%= pb_rails("caption", props: { margin_left: object.row[:children].present? ? "none" : "xs", text: object.subrow_header }) %>
                                <% end %>
                            <% end %>
                        <% end %>
                    </div>
                <% end %>
            <% end %>
        <% end %>
<% end %>

<script type="text/javascript">
    var expandAllSubRows = (element, rowDepth) => {
        element.closest(".toggle-content").querySelectorAll('.depth-sub-row-' + rowDepth + ' [data-advanced-table]').forEach((button) => {
            button.dispatchEvent(new Event('click'));
        });
    };
</script>

Version data entries

269 entries across 269 versions & 1 rubygems

Version Path
playbook_ui-14.5.0.pre.alpha.PLAY1486highchartscssdrivenPOC3953 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PLAY1486highchartscssdrivenPOC3950 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PBNTR374multilevelselectPOC3946 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PLAY1486highchartscssdrivenPOC3944 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.1 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.psych4support3941 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PLAY1486highchartscssdrivenPOC3940 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.javascriptassets3939 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.javascriptassets3932 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PLAY1486highchartscssdrivenPOC3931 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PLAY1486highchartscssdrivenPOC3930 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.javascriptassets3929 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.javascriptassets3928 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.javascriptassets3926 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.0 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.4.0.pre.alpha.javascriptassets3924 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.4.0.pre.alpha.PLAY1486highchartscssdrivenPOC3923 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.4.0.pre.alpha.stephenagreerpatch13922 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.4.0.pre.alpha.PLAY1486highchartscssdrivenPOC3921 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb