-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Consider table header content when double-clicking to resize column #61
Conversation
hmm your last gif of the "too wide" also puts all the text on one line. i wonder if that's why it gets so large? i don't really know how the table is used but if that sort of use case is at all common then it would be a blocking issue. |
const cellClasses = [ | ||
`.bp-table-cell-col-${columnIndex}`, | ||
".bp-table-column-name", | ||
".bp-table-header-content", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we should not consider this element? that would solve the issue in your 3rd gif, wouldn't it?
it makes intuitive sense to consider cell content and column title. i think we can safely ignore header content here because users can put whatever they want there (as demonstrated by this example) and it could get weird fast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I could kind of go either way. But I think Gilad's idea of ignore header content probably makes the most sense to the uses we see in the field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Sorry, missed the notifications here (still getting all of that set up). Will amend. |
@giladgray ready for re-review |
…alantir#61) * Consider header title too
Add component jsdoc description to sidebar
Before:
Only body content is considered when auto-resizing a column on double-click.
After:
(No header content)
(With header content, which we ignore when recalculating column width)