Skip to content

Commit

Permalink
fix(ui5-list): no data item now can be focused (SAP#9665)
Browse files Browse the repository at this point in the history
Fixes: SAP#9617
  • Loading branch information
plamenivanov91 authored Aug 9, 2024
1 parent 1e18e08 commit ec5d614
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/main/src/List.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<slot></slot>

{{#if showNoDataText}}
<li id="{{_id}}-nodata" class="ui5-list-nodata">
<li tabindex="0" id="{{_id}}-nodata" class="ui5-list-nodata">
<div id="{{_id}}-nodata-text" class="ui5-list-nodata-text">
{{noDataText}}
</div>
Expand Down
10 changes: 10 additions & 0 deletions packages/main/src/themes/List.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,21 @@
background-color: var(--sapList_Background);
border-bottom: 1px solid var(--sapList_BorderColor);
padding: 0 1rem !important;
outline: none;
height: var(--_ui5_list_no_data_height);
font-size: var(--_ui5_list_no_data_font_size);
font-family: "72override", var(--sapFontFamily);
}

.ui5-list-nodata:focus::after {
content: "";
border: var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);
position: absolute;
inset: 0.125rem;
pointer-events: none;
top: calc(50% + 0.125rem);
}

.ui5-list-nodata-text {
overflow: hidden;
text-overflow: ellipsis;
Expand Down

0 comments on commit ec5d614

Please sign in to comment.