首页 > 解决方案 > 为什么页面指南删除了滚动表格的能力?

问题描述

我正在使用 react-joyride 库,并且正在尝试为我的 tabke 制作页面指南,但它消除了添加 PageGuide 时水平和垂直滚动的能力。

pageGuide.js

export default function PageGuide() {
    return (
      <Joyride
        run={true}
        callback={() => null}
        steps={[
          {
            content:
              "This column MUST remain empty and untouched in order for your data to work properly.",
            target: ".react-grid-Cell:nth-child(1) "
          },
          {
            content:
              "Beginning from this column and continuing to the right, you may name the columns to letters. Every column name will be turned into a label for your chart.",
            target: ".react-grid-Cell:nth-child(2) "
          },
          {
            content:
              "This column has been configured to listen to an onContextMeny event. When the cell is right clicked, a message will be logged to the console",
            target: ".react-grid-Cell:nth-child(25) "
          }
        ]}
      />
    );
  }

main.js

        <ReactDataGrid
            columns={this.state.columns}
            rowGetter={i => this.state.rows[i]}
            rowsCount={this.state.rows.length}
            onGridRowsUpdated={this.onGridRowsUpdated}
            enableCellSelect={true}
        />
        <PageGuide />

当我在主反应文件中添加 PageGuide 时,它​​会删除我的表格滚动功能,任何人都可能知道为什么?

标签: reactjs

解决方案


推荐阅读