datagrok-ai / public

Public package repository for the Datagrok.ai platform
MIT License
43 stars 26 forks source link

#528: Changes made to grid row header are not saved with layout #528

Open dgosi opened 2 years ago

dgosi commented 2 years ago

Looks like that changes made to Grid's row header (column with index 0) are not saved with layout. To reproduce please run following snippet (which initially hides the header) then click Save and then Load. The loaded layout will show the row header which is wrong. After that please change the width of the row header and Save again. Loading the layout won't retain the changed width and will set it to the default value.

const df = grok.data.demo.randomWalk(100, 100);
const view = grok.shell.addTableView(df);
const col0 = view.grid.columns.byIndex(0);
col0.visible = false;

const idLayout = "13b27150-1890-11ec-a7b9-eff30b5796ed";

const dlg = ui.dialog("Layout");
dlg.addButton("Save", async () => {
    const layout = view.saveLayout();
    layout.id = idLayout;
    await grok.dapi.layouts.save(layout);
});

dlg.addButton("Load", async () => {
    const layout = await grok.dapi.layouts.find(idLayout);
    view.loadLayout(layout);
});

dlg.show();
dnillovna commented 7 months ago

This issue has been mirrored in Jira: https://reddata.atlassian.net/browse/GROK-14794

dnillovna commented 2 months ago

This issue has been mirrored in Jira: https://reddata.atlassian.net/browse/GROK-16054