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

[table] fix(Table2): uncontrolled resizing of cols/rows #5202

Merged
merged 2 commits into from
Mar 28, 2022

Conversation

mattskrobola
Copy link
Contributor

Fixes resizing rows/cols not visually updating for Tables that don't use the columnWidths / rowHeights prop.

I think this was introduced here where before we were comparing props.columnWidths to prevState.columnWidths where props.columnWidths was always undefined for Tables not using the prop. Now that there is an undefined check didColumnWidthsChange will always be false for Tables not using the prop.

Maybe a better spot for this update is in handleColumnWidthChanged ? We call validateGrid there, but that doesn't seem to visually update the table with the new sizes.

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

Added a check that prevState !== currentState for column widths and row heights when the prop is not set

Screenshot

before:
before

after:
after

@adidahiya
Copy link
Contributor

thanks @mattskrobola!

@adidahiya adidahiya changed the title [table] fix visual resizing Cols/Rows for Tables that do not use columnWidths/rowHeights prop [table] fix(Table2): uncontrolled resizing of cols/rows Mar 28, 2022
@adidahiya adidahiya merged commit 3934488 into palantir:develop Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants