Skip to content

Commit

Permalink
Fix(MWPW-164736):Table header cell height fix. (#3429)
Browse files Browse the repository at this point in the history
* table header bug fix

* resolved evet added

* once settled added

* table heading height handling

* setInterval approach

* mas:resolved added to parent element

* reverted unwanted changes

* reverted unwanted changes

* height calculated for tables without pricing

* added test cases

* Revert "added test cases"

This reverts commit a1f8667.

* Reapply "added test cases"

This reverts commit 4966fc7.

* reverted
  • Loading branch information
sharath-kannan authored Jan 9, 2025
1 parent 5bbb0bf commit c582faa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/blocks/table/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function defineDeviceByScreenSize() {
return 'TABLET';
}

function isStickyHeader(el) {
export function isStickyHeader(el) {
return el.classList.contains('sticky')
|| (el.classList.contains('sticky-desktop-up') && defineDeviceByScreenSize() === 'DESKTOP')
|| (el.classList.contains('sticky-tablet-up') && defineDeviceByScreenSize() !== 'MOBILE' && !isMobileLandscape());
Expand Down Expand Up @@ -150,6 +150,7 @@ function handleAddOnContent(table) {
});
});
setTimeout(() => handleEqualHeight(table, '.row-heading'), 0);
table.addEventListener('mas:resolved', debounce(() => { handleEqualHeight(table, '.row-heading'); }));
}

function handleHighlight(table) {
Expand Down

0 comments on commit c582faa

Please sign in to comment.