ant design table中的rowSelection的获取不到值或者undifined的问题

<Table
      {...listProps}
      dataSource={list}
      className={classnames({ [styles.table]: true })}
      bordered
      scroll={{ x: 100 }}
      columns={getColumns()}
      rowSelection={handlerRowSelection}
      //  components={getBodyWrapper}
     rowKey={record => record.timestamp + '' + record.module + '' + generalKey()}
      pagination={{
        simple: false,
        current: listProps.pagination.current,
        total: listProps.pagination.total,
        pageSizeOptions: ['10', '20', '30', '40', '50'],
        showSizeChanger: true,
        pageSize: listProps.pagination.pageSize,
        showTotal: (count = listProps.pagination.total) => {
          return '共' + count + '条数据'
        },
        onChange: (page, currentType) => {
        },
      }}
    />

我多加了rowKey那一行,把他去掉,就能获取到了。自己猜测应该是数据值与他自己赋的值有冲突。

哈哈哈

posted @ 2019-11-01 18:40  忧伤还是快乐EL  阅读(2311)  评论(0编辑  收藏  举报