Skip to content

Commit 2d34b93

Browse files
fix(ui5-search-item): action slot visibility (#12694)
1 parent 4e18756 commit 2d34b93

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

packages/fiori/cypress/specs/Search.cy.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,35 @@ describe("Properties", () => {
514514
.should("not.exist");
515515
});
516516

517+
it("action buttons are always visible", () => {
518+
cy.mount(
519+
<Search>
520+
<SearchItem text="Item 1" deletable>
521+
<Button design={ButtonDesign.Transparent} icon={favorite} slot="actions"/>
522+
<Button design={ButtonDesign.Transparent} icon={edit} slot="actions"/>
523+
</SearchItem>
524+
</Search>
525+
);
526+
527+
cy.get("[ui5-search]")
528+
.shadow()
529+
.find("input")
530+
.realClick();
531+
532+
cy.realPress("I");
533+
534+
cy.get("[ui5-search-item]")
535+
.eq(0)
536+
.find("[ui5-button][icon='favorite']")
537+
.should("be.visible");
538+
539+
cy.get("[ui5-search-item]")
540+
.eq(0)
541+
.find("[ui5-button][icon='edit']")
542+
.should("be.visible");
543+
544+
})
545+
517546
it("tab navigation between action buttons works correctly", () => {
518547
cy.mount(
519548
<Search>

packages/fiori/src/themes/SearchItem.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,11 @@
3434
display: none;
3535
}
3636

37-
:host([desktop]) .ui5-search-item-actions {
38-
display: none;
39-
}
40-
4137
:host(:hover),
4238
:host(:focus-within) {
4339
.ui5-search-item-selected-delete {
4440
display: inline-block;
4541
}
46-
47-
.ui5-search-item-actions {
48-
display: flex;
49-
}
5042
}
5143

5244
.ui5-search-item-actions {

0 commit comments

Comments
 (0)