From 242ffd2e8d6eb0d8ae26d533d1209ebca1ef8fb7 Mon Sep 17 00:00:00 2001 From: "nida.ghuman" Date: Mon, 23 Dec 2024 16:35:18 -0500 Subject: [PATCH] wrapped column logic --- .../pb_advanced_table/table_header.html.erb | 7 ++-- .../pb_advanced_table/table_header.rb | 33 ++++++++++++++++--- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/playbook/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb b/playbook/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb index 8542074ead..02253179fe 100644 --- a/playbook/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +++ b/playbook/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb @@ -2,12 +2,10 @@ <% object.header_rows.each_with_index do |header_row, row_index| %> <%= pb_rails("table/table_row", props: { tag: "div" }) do %> <% header_row.each_with_index do |cell, cell_index| %> - <% header_id = cell[:accessor].present? ? cell[:accessor] : "header_#{row_index}_#{cell_index}" %> - <%= pb_rails("table/table_header", props: { tag: "div", id: header_id, classname: object.th_classname, sort_menu: cell[:accessor] ? cell[:sort_menu] : nil }) do %> - <%= pb_rails("flex", props:{ align: "center", justify: row_index.zero? ? "start" : "end", text_align: "end" }) do %> - <% if cell_index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") %> + <%= pb_rails("flex", props:{ align: "center", justify: cell_index.zero? ? "start" : "end", text_align: "end" }) do %> + <% if cell_index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") && row_index === header_rows.size - 1 %>