Posted 16 June 2019, 11:57 pm EST
Hi,
I have an issue where I’m using flex-sheet and I have a dynamic number of columns that render on load. I want the columns to auto-adjust themselves as much as possible according to the screen space available in order to avoid unnecessary horizontal scrolls in some cases whereas empty whitespace in case of others.
For example,
- If there are 5 columns available, they must occupy the entire width of the div so that empty whitespace is avoided.
- If there are 10 columns available and they can fit in the available space, then their widths must be adjusted in such a way that they do fit.
- If there are 10+ columns available and they cannot fit in, then a horizontal scroll must appear.
Basically, all I want is that the columns must auto-adjust their widths as per the content but with some minimum width value beyond which they must not wrap AND if there are lesser columns, then they must auto-adjust their widths to occupy the width of the div completely.