Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuke-list-view

Package Overview
Dependencies
Maintainers
3
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-list-view

列表

  • 0.2.0
  • npm
  • Socket score

Version published
Weekly downloads
80
increased by280.95%
Maintainers
3
Weekly downloads
 
Created
Source

Listview

  • category: UI
  • chinese: 列表
  • type: UI组件

何时使用

列表组件

API

ListView

属性说明类型默认值
renderHeader头部function
renderFooter底部function
renderRow渲染单行的方法function
dataSource数据源array
onEndReached加载到底部时触发 的事件原onloadmore 事件
onEndReachedThreshold加载更多的位移设置量string500
showScrollbar是否显示滚动条bool

关于ListView的子组件

  • RefreshControl 用于控制下拉刷新,可以在renderHeader 方法中使用,用于控制下拉刷新。此组件只能在客户端生效
  • Cell 此组件在ListView 组件渲染时将被自动加上,因此开发者不需要关注此组件

实例方法

  • resetLoadmore 相关ISSUE

有业务自行控制的是否触发loadmore事件

     //reset事件可以有button或其他方式控制,实现无限下拉的节流
    reset=(e)=>{
        this.refs.mylist.resetLoadmore();
    }
    render(){
        return (
                <ListView ref="mylist"
                onChange={this.change}
                renderHeader={this.renderHeader}
                renderFooter={this.renderFooter}
                renderRow={this.renderItem.bind(this)}
                dataSource={this.state.data}
                ><ListView/>
        )
    }

Keywords

FAQs

Package last updated on 17 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc