【问题标题】:Why my React application with Table component doesn't display all of the records?为什么我的带有 Table 组件的 React 应用程序不显示所有记录?
【发布时间】:2020-09-07 08:09:35
【问题描述】:

为什么我的带有来自Blueprintjs 的表格组件的 React 应用程序不显示所有记录?它只显示


    import React, { Component } from 'react';
    import {Table, Column, Cell} from '@blueprintjs/table';
    import "@blueprintjs/table/lib/css/table.css"   
    
    export default class App extends Component{
        public render() {
            return (
                    <Table numRows={500} enableGhostCells = {true}>
                        <Column key={1} name = {"0"} cellRenderer={this.ColumnHeaderCellRenderer}/>
                    </Table>
            )
        }
    
        ColumnHeaderCellRenderer = (rowIndex, columnIndex) => {
            return <Cell>{(rowIndex*columnIndex).toString()}</Cell>
        }
    }

【问题讨论】:

  • db或table有多少条记录?
  • 我使用的数据集中大约有 700 条记录。但我认为这并不重要,因为如果数据集中只有 202 条记录,它只会显示 201 条记录。
  • JS 控制台或 React 控制台没有错误?

标签: reactjs datatable blueprint


【解决方案1】:

问题是由不正确的 css 引起的。 https://github.com/palantir/blueprint/issues/1807

【讨论】:

    猜你喜欢
    • 2020-10-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-30
    • 1970-01-01
    • 2011-01-26
    • 1970-01-01
    相关资源
    最近更新 更多