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.PLAY1548intltelinputupdatelatest4037 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.20241007playbookwebsiteaddrdbms4036 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PBNTR606multilevelselectreset4035 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4032 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4028 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.12 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.11 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.10 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.9 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.8 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.7 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.6 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.5 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PLAY1510railsformloading3977 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PLAY1510railsformloading3976 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PLAY1510railsformloading3975 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.4 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.3 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.6.0.pre.rc.2 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.5.0.pre.alpha.PLAY1486highchartscssdrivenPOC3954 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb