fix: PR fixes

This commit is contained in:
Taranto 2020-04-20 18:04:22 +01:00 committed by Josh Harvey
parent 1f6d272aa0
commit 21f3ee59ea
9 changed files with 52 additions and 43 deletions

View file

@ -9,12 +9,12 @@ const SecretInput = memo(({ value, onFocus, onBlur, ...props }) => {
const previouslyFilled = !!value
const tempValue = previouslyFilled ? '' : value
const iOnFocus = event => {
const innerOnFocus = event => {
setFocused(true)
onFocus && onFocus(event)
}
const iOnBlur = event => {
const innerOnBlur = event => {
setFocused(false)
onBlur && onBlur(event)
}
@ -23,8 +23,8 @@ const SecretInput = memo(({ value, onFocus, onBlur, ...props }) => {
<TextInput
{...props}
type="password"
onFocus={iOnFocus}
onBlur={iOnBlur}
onFocus={innerOnFocus}
onBlur={innerOnBlur}
value={value}
InputProps={{ value: !focused ? tempValue : value }}
InputLabelProps={{ shrink: previouslyFilled || focused }}