Skip to content

Commit

Permalink
Align on field + remove onBlur
Browse files Browse the repository at this point in the history
  • Loading branch information
Corantin committed Feb 3, 2022
1 parent 71268ee commit 0f65465
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/react-app/src/components/field-input/field-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const LineStyled = styled.div`

const ContentWrapperStyled = styled.div`
display: flex;
align-items: center;
align-items: ${({ align }: any) => align};
${(props: any) => (!props.compact ? 'min-height: 45px;' : '')}
& > div {
input {
Expand All @@ -55,6 +55,7 @@ type Props = {
isLoading: boolean;
wide?: boolean;
direction?: 'row' | 'column';
align?: 'center' | 'baseline' | 'flex-start' | 'flex-end' | 'unset';
};

export function FieldInput({
Expand All @@ -67,6 +68,7 @@ export function FieldInput({
isLoading = false,
wide = false,
direction = 'row',
align = 'center',
}: Props) {
const theme = useTheme();
const labelComponent = label && (
Expand All @@ -86,7 +88,7 @@ export function FieldInput({
<Skeleton />
</SkeletonWrapperStyled>
) : (
<ContentWrapperStyled compact={compact} wide={wide} direction={direction}>
<ContentWrapperStyled compact={compact} wide={wide} direction={direction} align={align}>
{children}
</ContentWrapperStyled>
)}
Expand Down
1 change: 0 additions & 1 deletion packages/react-app/src/components/quest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ export default function Quest({
} as QuestModel
}
onSubmit={(values, { setSubmitting }) => onQuestSubmit(values, setSubmitting)}
validateOnBlur
validate={validate}
>
{({ values, handleChange, handleSubmit }) =>
Expand Down

0 comments on commit 0f65465

Please sign in to comment.