Code Monkey home page Code Monkey logo

Comments (7)

cyqresig avatar cyqresig commented on June 27, 2024

EddyDaddy 您好,
感谢您提交的问题,会尽快对该问题进行排查和后续修复~

from react-native-smart-pull-to-refresh-listview.

EddyDaddy avatar EddyDaddy commented on June 27, 2024

是从网络获取数据后,endfresh调用。跟代码是_setPaddingBlank 方法中,目前是加了一层保护
_setPaddingBlank = (paddingDisabled) => {
let innerViewRef = this._scrollView.refs.InnerScrollView || this._scrollView._innerViewRef || this._innerScrollView.refs.InnerScrollView || this._innerScrollView._innerViewRef
innerViewRef.measure((ox, oy, width, height, px, py) => {
if (!paddingDisabled && height - this._paddingBlankDistance < this._scrollViewContainerHeight) {
this._paddingBlankDistance = this._scrollViewContainerHeight - (height - this._paddingBlankDistance)
}
else {
this._paddingBlankDistance = 0
}
if(this._footer){
this._footer.setNativeProps({
style: {
marginTop: this._paddingBlankDistance,
}
})
}
})
}

from react-native-smart-pull-to-refresh-listview.

cyqresig avatar cyqresig commented on June 27, 2024

您好,我这里的小米手机暂时还没有试出过您描述的问题。关于这个问题,在上述代码段中增加了this._footer判空的条件语句可以防止报错,但是后续设置marginTop的代码段将不会执行哦。
您试下不判空,通过增加一个定时器的方式是否也能解决您的问题,如果确认可以,我会将此修改提交发布更新版本。
setTimeout( () => {
this._footer.setNativeProps({
style: {
marginTop: this._paddingBlankDistance,
}
})
}, 1 )

from react-native-smart-pull-to-refresh-listview.

EddyDaddy avatar EddyDaddy commented on June 27, 2024

嘗試了一下。fetch回來后,延遲2S 設置數據。解決到這個問題。最初在onRefresh的時候,就直接請求網絡獲取數據,如果網絡請求返回很快,就會出現這個問題。謝謝你的即時恢復,thks

from react-native-smart-pull-to-refresh-listview.

cyqresig avatar cyqresig commented on June 27, 2024

感谢您的反馈,将会根据您的描述尝试重现并进行问题排查

from react-native-smart-pull-to-refresh-listview.

cyqresig avatar cyqresig commented on June 27, 2024

您好,当前版本已针对这个问题作了更新,调整了执行onRefresh的时机,现在应已不需要额外设置延迟执行了。

from react-native-smart-pull-to-refresh-listview.

EddyDaddy avatar EddyDaddy commented on June 27, 2024

Thks. I will update to 1.6.5.

from react-native-smart-pull-to-refresh-listview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.