Skip to content

Commit 5753294

Browse files
committed
[dropdown-width] fix overflow issues by setting max width or setting an ellipsis
1 parent 5e453ac commit 5753294

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

packages/wonder-blocks-dropdown/src/components/action-item.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ const styles = StyleSheet.create({
239239
lineHeight: sizing.size_200,
240240
whiteSpace: "nowrap",
241241
userSelect: "none",
242+
overflow: "hidden",
243+
textOverflow: "ellipsis",
242244
},
243245

244246
indent: {

packages/wonder-blocks-dropdown/src/components/dropdown-core.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ class DropdownCore extends React.Component<Props, State> {
10711071
const styles = StyleSheet.create({
10721072
menuWrapper: {
10731073
width: "fit-content",
1074+
maxWidth: "100%",
10741075
},
10751076

10761077
dropdown: {

packages/wonder-blocks-dropdown/src/components/dropdown-popper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const DropdownPopper = function ({
9999
return (
100100
<div
101101
ref={ref}
102-
style={style}
102+
style={{...style, maxWidth: "100%"}}
103103
data-testid="dropdown-popper"
104104
data-placement={placement}
105105
>

0 commit comments

Comments
 (0)