GriddleGriddle / Griddle

Simple Grid Component written in React
http://griddlegriddle.github.io/Griddle/
MIT License
2.5k stars 377 forks source link

Setting a tableWidth in pluginsPositionPlugin({tableHeight: 300, tableWidth: 300}) breaks virtual scrolling #766

Closed Saldivarcher closed 6 years ago

Saldivarcher commented 6 years ago

Griddle version

1.10.1

Expected Behavior

Allowed to set both the height and width of the table, without virtual scrolling breaking.

Actual Behavior

Virtual scrolling is completely unusable when setting a width of any size.

Steps to reproduce

  .add('with virtual scrolling', () => {
    return (
      <Griddle data={fakeData} plugins={[LocalPlugin, PositionPlugin({ tableHeight: 300, tableWidth: 300 })]}>
        <RowDefinition>
          <ColumnDefinition id="name" order={2} customHeadingComponent={GreenLeftSortIconComponent} width={300} />
          <ColumnDefinition id="state" order={1} width={400} />
        </RowDefinition>
      </Griddle>
    )
  })