don't spring on way down
This commit is contained in:
committed by
Eric Bailey
parent
6e4268e7f7
commit
4183a1e99d
@@ -468,10 +468,14 @@ function ExpandableRichTextView({
|
|||||||
scrollEnabled={expanded}
|
scrollEnabled={expanded}
|
||||||
onContentSizeChange={(_w, h) => {
|
onContentSizeChange={(_w, h) => {
|
||||||
if (contentHeight !== 0) {
|
if (contentHeight !== 0) {
|
||||||
LayoutAnimation.configureNext({
|
LayoutAnimation.configureNext(
|
||||||
|
h > contentHeight
|
||||||
|
? {
|
||||||
duration: 500,
|
duration: 500,
|
||||||
update: {type: 'spring', springDamping: 0.6},
|
update: {type: 'spring', springDamping: 0.6},
|
||||||
})
|
}
|
||||||
|
: LayoutAnimation.Presets.easeInEaseOut,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
setContentHeight(h)
|
setContentHeight(h)
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user