Skip to content

Commit

Permalink
fix: Adjusting the width of dropdown
Browse files Browse the repository at this point in the history
fix prettier
  • Loading branch information
zoesteinkamp committed May 13, 2020
1 parent 8616b92 commit 8baff1c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ui/src/variables/components/VariableDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ class VariableDropdown extends PureComponent<Props> {
const dropdownStatus =
values.length === 0 ? ComponentStatus.Disabled : ComponentStatus.Default

const longestItemWidth =
Math.floor(values.reduce(function(a, b) {
const longestItemWidth = Math.floor(
values.reduce(function(a, b) {
return a.length > b.length ? a : b
}, '').length * 8.5)
}, '').length * 8.5
)

const widthLength = Math.max(140, longestItemWidth)

Expand Down

0 comments on commit 8baff1c

Please sign in to comment.