We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71c5a5e commit 015e684Copy full SHA for 015e684
src/variables/components/TypeAheadVariableDropdown.tsx
@@ -38,7 +38,14 @@ class TypeAheadVariableDropdown extends PureComponent<Props> {
38
name: selectedValue,
39
} as SelectableItem
40
41
- const typeAheadStyle = {width: '150px'}
+ // handle the case where the selected value is ""
42
+ const calculatedWidth =
43
+ selectedVariableValue.name?.length > 0
44
+ ? selectedVariableValue.name.length * 8 + 110
45
+ : 150
46
+ const typeAheadStyle = {
47
+ width: `${calculatedWidth}px`,
48
+ }
49
return (
50
<TypeAheadDropDown
51
style={typeAheadStyle}
0 commit comments