Skip to content

Commit

Permalink
chore: table
Browse files Browse the repository at this point in the history
  • Loading branch information
nnaydenow committed Jan 31, 2025
1 parent 2075474 commit 8b032e9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
4 changes: 2 additions & 2 deletions packages/main/cypress/specs/TableGrowing.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ describe("TableGrowing - Scroll", () => {
cy.get("[ui5-table-growing]")
.shadow()
.find("#growing-button")
.should("not.exist");
.should("not.be.visible");

cy.get("[ui5-table]")
.shadow()
Expand Down Expand Up @@ -265,7 +265,7 @@ describe("TableGrowing - Scroll", () => {
cy.get("[ui5-table-growing]")
.shadow()
.find("#growing-button")
.should("not.exist");
.should("not.be.visible");

cy.get("[ui5-table]")
.shadow()
Expand Down
36 changes: 17 additions & 19 deletions packages/main/src/TableGrowing.hbs
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
{{#if _hasGrowingButton}}
<div
id="growing-button"
tabindex="-1"
?active="{{_activeState}}"
@click="{{loadMore}}"
@keydown="{{_onKeydown}}"
@keyup="{{_onKeyup}}"
@focusout="{{_onFocusout}}"
role="button"
aria-labelledby="growing-text growing-subtext"
aria-describedby="growing-description">
<span id="growing-text">{{_growingButtonText}}</span>
{{#if growingSubText}}
<span id="growing-subtext">{{growingSubText}}</span>
{{/if}}
<span id="growing-description" style="display: none;" aria-hidden="true">{{_growingButtonDescription}}</span>
</div>
{{/if}}
<div
id="growing-button"
tabindex="-1"
?active="{{_activeState}}"
@click="{{loadMore}}"
@keydown="{{_onKeydown}}"
@keyup="{{_onKeyup}}"
@focusout="{{_onFocusout}}"
role="button"
aria-labelledby="growing-text growing-subtext"
aria-describedby="growing-description">
<span id="growing-text">{{_growingButtonText}}</span>
{{#if growingSubText}}
<span id="growing-subtext">{{growingSubText}}</span>
{{/if}}
<span id="growing-description" style="display: none;" aria-hidden="true">{{_growingButtonDescription}}</span>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ function mount(component, options = {}) {
.find("*")
.should($el => {
const shadowrootsExist = [...$el].every(el => {
if (el.hasAttribute("ui5-table-growing")) {
return true;
}

if (el.tagName.includes("-") && el.shadowRoot) {
return el.shadowRoot.hasChildNodes();
}
Expand Down

0 comments on commit 8b032e9

Please sign in to comment.