animate
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import React, {useRef} from 'react'
|
import React, {useRef} from 'react'
|
||||||
import {View} from 'react-native'
|
import {LayoutAnimation, View} from 'react-native'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
@@ -111,6 +111,12 @@ export function StepHandle() {
|
|||||||
dispatch({type: 'setError', value: ''})
|
dispatch({type: 'setError', value: ''})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (val === '' || handleValueRef.current === '') {
|
||||||
|
LayoutAnimation.configureNext(
|
||||||
|
LayoutAnimation.Presets.easeInEaseOut,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// These need to always be in sync.
|
// These need to always be in sync.
|
||||||
handleValueRef.current = val
|
handleValueRef.current = val
|
||||||
setDraftValue(val)
|
setDraftValue(val)
|
||||||
|
|||||||
Reference in New Issue
Block a user