gpt4 book ai didi

javascript - react native ListView scrollToEnd 它不起作用

转载 作者:可可西里 更新时间:2023-11-01 02:18:02 25 4
gpt4 key购买 nike

我使用了 ListView 的 scrollToEnd,但它不起作用,但它适用于 scrollTo。我应该如何处理它。

enter image description here

enter image description here

最佳答案

有一个解决方法,将其包装在 setTimeout 中,如下所示:

componentDidMount() {
setTimeout(() => {
this.refs.dateList.scrollToEnd();
}, 50);
}

关于javascript - react native ListView scrollToEnd 它不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42313308/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com