pupudu / window-table

Windowing Table for React based on React Window
https://window-table.netlify.com/
170 stars 13 forks source link

allow string widths #54

Closed hipstersmoothie closed 4 years ago

hipstersmoothie commented 4 years ago

the react-window docs say that the width can be a string like 4rem

pupudu commented 4 years ago

Hey @hipstersmoothie Thanks a lot for the PR. However, this will be a bit tricky. Although react-window allows string widths, window-table does some calculations using the numeric value. Thus making it accept strings will break a bunch of things.

The solution as of now would be to have a wrapper which can take care of the width for us.

<div style={{ width: '50rem'}}>
  <WindowTable {/*props*/} />
</div>