Skip to content

Commit

Permalink
Merge pull request #41 from zopaUK/hotfix/input-forward-ref
Browse files Browse the repository at this point in the history
Forward ref on `<TextInput />`
  • Loading branch information
ubbe-xyz committed Jul 1, 2019
2 parents fdbe65d + cce239b commit 6309f13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/atoms/InputText/InputText.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { forwardRef } from 'react';
import styled from 'styled-components';
import * as colors from '../../../constants/colors';
import { getBorderColorByStatus } from '../../../helpers/utils';
Expand Down Expand Up @@ -28,8 +28,8 @@ const Input = styled.input<IInput>`
}
`;

const InputText = (props: IInput) => {
return <Input {...props} />;
};
const InputText = forwardRef((props: IInput, ref) => {
return <Input {...props} ref={ref} />;
});

export default InputText;

0 comments on commit 6309f13

Please sign in to comment.