Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 880 Bytes

README.md

File metadata and controls

50 lines (36 loc) · 880 Bytes

select-table-antd

支持 antd checkbox 的滚动加载表格组件,适用于表格数据量大 不用翻页 支持选择的场景

Install

npm install --save select-table-antd

Usage

import React, { Component } from 'react'

import SelectableTable from 'select-table-antd'

class Example extends Component {
  const columns = [

  ]
  onSelectRows = () => {

  }
  render () {
    return (
      <SelectableTable
        width={220}
        height={420}
        selectable
        columns={columns}
        className=''
        data={[]}
        rowKey="id"
        onRowSelect={this.onSelectRows}
        onSelectedRowsChange={(r) => {console.log(r, 'rrr'); this.setState({ selectedRowKeys: r})}}

        allRows={selectedRowKeys}

        headerRenderer={null}
      />
    )
  }
}

License

MIT © Go7hic