Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 'minInitialWidth' Column Layout Option #4585

Open
Alfeezy opened this issue Sep 20, 2024 · 0 comments
Open

Implement 'minInitialWidth' Column Layout Option #4585

Alfeezy opened this issue Sep 20, 2024 · 0 comments
Labels
Suggested Feature A suggested feature that is waiting review

Comments

@Alfeezy
Copy link

Alfeezy commented Sep 20, 2024

Is your feature request related to a problem? Please describe.
When rendering a table using fitData, I am manually setting all columns' minWidth to table.clientWidth / columns.length. This essentially combines fitColumns and fitData functionality, with the greater of the two calculations being prioritized for the column width.

This solution is fairly clean with one exception- I cannot resize the columns to be smaller than the minWidth, which is not my intended functionality.

Describe the solution you'd like
Implement the a minInitialWidth column layout option which complements maxInitialWidth:

columns = [
  {
    ...
    minInitialWidth: // value in px,
    ...
  },
  ...
]

with the following description:

sets the minimum width of this column when it is first rendered, the user can then resize to below this (down to the minWidth, if set) this should be set in pixels

Describe alternatives you've considered
Alternatively, a new layout mode could be introduced that merges the fitColumns and fitData/fitDataFill (eg. fitColumnsData/fitColumnsDataFill) that always fills the table, but still adheres to the minWidth constraints of fitData.

@Alfeezy Alfeezy added the Suggested Feature A suggested feature that is waiting review label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggested Feature A suggested feature that is waiting review
Projects
None yet
Development

No branches or pull requests

1 participant