Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tab切换时,tabbarView是一样的页面时,刷新及加载的状态怎么控制?求助 #7

Open
hxingever opened this issue Jan 14, 2022 · 4 comments

Comments

@hxingever
Copy link

hxingever commented Jan 14, 2022

作者你好,用的您的框架写的:小白遇到一个问题请教:如图
image

tab切换但是tabbarView是同一个页面时,状态怎么处理,主要是列表刷新及加载的时候。第一页调用了loadNoMore,切换到下一页时,加载更多无效了,应该重置它的状态吧,
image
遇到的问题 如图一,想知道这种情况怎么处理,求指导,谢谢!

@jhflovehqy
Copy link
Owner

你好,这种不固定的tab条目数,建议你继承BaseGetController自定义,大概思路是管理Tab栏中的数据和下拉刷新加载状态,BaseGetPageController可能不太适用于多个未知Tab

在者,不建议为了减少嵌套将Widget分成方法,因为这会导致Widget在状态变化时多次重建[https://juejin.cn/post/6985053829276368910]

@hxingever
Copy link
Author

非常感谢大佬的建议,我学习尝试下。

@hxingever
Copy link
Author

@jhflovehqy 试了下 大佬Demo的搜索界面,应该是个该问题的bug吧:
image

@jhflovehqy
Copy link
Owner

感谢您的反馈,此BUG出现的原因是在点击搜索时RefreshController未重新设置状态,更改后的代码已上传到仓库
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants