From 60ea64a577eb4226d048e981caaee0caa3f478d3 Mon Sep 17 00:00:00 2001 From: Mirlan Date: Wed, 8 Jul 2020 12:40:22 +0600 Subject: [PATCH] fix(#189): registration step micro bug fixes (#28) Co-authored-by: mirlan.maksitaliev --- src/features/Combobox/hooks/index.tsx | 7 +------ src/features/Combobox/index.tsx | 3 ++- src/features/Combobox/styled.tsx | 20 +++++++++++-------- src/features/Combobox/types.tsx | 1 + src/features/Login/index.tsx | 2 +- .../components/RegistrationStep/index.tsx | 1 + src/features/UserAccount/index.tsx | 2 ++ 7 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/features/Combobox/hooks/index.tsx b/src/features/Combobox/hooks/index.tsx index 80e64915..dc3ccd53 100644 --- a/src/features/Combobox/hooks/index.tsx +++ b/src/features/Combobox/hooks/index.tsx @@ -3,7 +3,6 @@ import { useState, useCallback } from 'react' import isUndefined from 'lodash/isUndefined' import toLower from 'lodash/toLower' -import slice from 'lodash/slice' import find from 'lodash/find' import trim from 'lodash/trim' @@ -71,11 +70,7 @@ export const useCombobox = (props: Props) => { onInputBlur, onOptionSelect, onQueryChange, - options: slice( - results, - 0, - 20, - ), + options: results, query, } } diff --git a/src/features/Combobox/index.tsx b/src/features/Combobox/index.tsx index 9081d22d..515eebe1 100644 --- a/src/features/Combobox/index.tsx +++ b/src/features/Combobox/index.tsx @@ -29,6 +29,7 @@ export const Combobox = (props: Props) => { pattern, required, title, + withArrow, } = props const { onInputBlur, @@ -51,7 +52,7 @@ export const Combobox = (props: Props) => { ? : label } - + {withArrow && } = Pick, ( openOnFocus?: boolean, options: Array, value?: string, + withArrow?: boolean, } diff --git a/src/features/Login/index.tsx b/src/features/Login/index.tsx index 26d30feb..e3f6bd34 100644 --- a/src/features/Login/index.tsx +++ b/src/features/Login/index.tsx @@ -17,7 +17,7 @@ import { RegisterButton, } from './styled' -const labelWidth = 60 +const labelWidth = 75 export const Login = () => { const { handleSubmit } = useForm() diff --git a/src/features/Register/components/RegistrationStep/index.tsx b/src/features/Register/components/RegistrationStep/index.tsx index 132c313d..a056cf43 100644 --- a/src/features/Register/components/RegistrationStep/index.tsx +++ b/src/features/Register/components/RegistrationStep/index.tsx @@ -85,6 +85,7 @@ export const RegistrationStep = () => { ( labelWidth={labelWidth} /> ( labelWidth={labelWidth} />