Skip to content

Fix column group resize#136

Merged
texodus merged 1 commit intomasterfrom
fix-column-group-resize
Apr 14, 2021
Merged

Fix column group resize#136
texodus merged 1 commit intomasterfrom
fix-column-group-resize

Conversation

@texodus
Copy link
Copy Markdown
Member

@texodus texodus commented Apr 14, 2021

Fixes buggy column-resize behavior when the actual header edge which was clicked on belongs to a column group. Before:

resize_old

After:

resize_new

@texodus texodus added the bug Concrete, reproducible bugs label Apr 14, 2021
Comment thread src/js/events.js
element = this.table_model.header.get_column_header(metadata._virtual_x);
const width = this._column_sizes.indices[metadata.size_key];
const move = (event) => this._on_resize_column_move(event, element, start, width, metadata);
const header_x = _virtual_x + element.colSpan - 1;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the source of the bug - where previously we used _virtual_x, he now use header_x which takes into account a label's colSpan when determining which data column they correspond to.

@texodus texodus merged commit f284a4e into master Apr 14, 2021
@texodus texodus deleted the fix-column-group-resize branch April 14, 2021 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Concrete, reproducible bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant