Skip to content

Commit

Permalink
fix(ComboBox): make flexible container
Browse files Browse the repository at this point in the history
  • Loading branch information
LamaEats committed Aug 1, 2023
1 parent 7b0a67b commit dea32ba
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/ComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ interface ComboBoxProps {

const StyledComboBox = styled.span`
position: relative;
display: flex;
`;

const StyledComboBoxInputWrpper = styled.span`
flex: 1 0 0;
`;

const StyledErrorTrigger = styled.div`
Expand Down Expand Up @@ -181,7 +186,7 @@ export const ComboBox = forwardRef<HTMLDivElement, ComboBoxProps>(
</>
))}

<span ref={popupRef} {...onESC}>
<StyledComboBoxInputWrpper ref={popupRef} {...onESC}>
{renderTrigger ? (
<>
{editMode
Expand All @@ -191,7 +196,7 @@ export const ComboBox = forwardRef<HTMLDivElement, ComboBoxProps>(
) : (
renderInput({ value, disabled, ref: inputRef, ...onENTER })
)}
</span>
</StyledComboBoxInputWrpper>

<Popup
placement={placement}
Expand Down

0 comments on commit dea32ba

Please sign in to comment.