Skip to content

Commit 85ebc36

Browse files
committed
Add data-y attribute to datagrid td and th elements
Signed-off-by: Andrew Stein <steinlink@gmail.com>
1 parent 5df030c commit 85ebc36

3 files changed

Lines changed: 1 addition & 2 deletions

File tree

packages/perspective-viewer-datagrid/src/js/plugin/draw.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ export async function draw(view) {
3131
const old_sizes = save_column_size_overrides.call(this);
3232
const draw = this.regular_table.draw({ invalid_columns: true });
3333
if (!this.model._preserve_focus_state) {
34-
this.regular_table.scrollTop = 0;
35-
this.regular_table.scrollLeft = 0;
3634
this.regular_table.dispatchEvent(
3735
new CustomEvent("psp-deselect-all", { bubbles: false })
3836
);

packages/perspective-viewer-datagrid/src/js/style_handlers/table_cell/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export function table_cell_style_listener(regularTable, viewer) {
8282
cell_style_row_header.call(this, regularTable, td, metadata);
8383
}
8484

85+
td.dataset.y = metadata.y;
8586
td.classList.toggle("psp-align-right", !is_th && is_numeric);
8687
td.classList.toggle("psp-align-left", is_th || !is_numeric);
8788
td.classList.toggle(
3.46 KB
Binary file not shown.

0 commit comments

Comments
 (0)