Skip to content

Commit 1231623

Browse files
authored
Fix text truncation in mobile SearchAutocomplete (#3507)
1 parent 24afd2a commit 1231623

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

packages/@react-spectrum/autocomplete/src/MobileSearchAutocomplete.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ const SearchAutocompleteButton = React.forwardRef(function SearchAutocompleteBut
279279
classNames(
280280
searchStyles,
281281
'spectrum-Search-input'
282+
),
283+
classNames(
284+
searchAutocompleteStyles,
285+
'mobile-input'
282286
)
283287
)
284288
}>

packages/@react-spectrum/autocomplete/src/searchautocomplete.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
}
2929

3030
.mobile-input {
31-
white-space: nowrap;
32-
overflow: hidden;
33-
text-overflow: ellipsis;
31+
display: flex;
32+
align-items: center;
3433
}
3534

3635
.mobile-value {
37-
vertical-align: middle;
36+
white-space: nowrap;
37+
overflow: hidden;
38+
text-overflow: ellipsis;
3839
}
3940

4041
.tray-dialog {

packages/@react-spectrum/combobox/src/combobox.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
}
2929

3030
.mobile-input {
31-
white-space: nowrap;
32-
overflow: hidden;
33-
text-overflow: ellipsis;
31+
display: flex;
32+
align-items: center;
3433
}
3534

3635
.mobile-value {
37-
vertical-align: middle;
36+
white-space: nowrap;
37+
overflow: hidden;
38+
text-overflow: ellipsis;
3839
}
3940

4041
.tray-dialog {

0 commit comments

Comments
 (0)