Skip to content

Question: How to reset the Persepective Viewer component? #2586

@tobilg

Description

@tobilg

Not a bug report, but a question: How can I reset the Perspective Viewer components configuration? I use is in my https://sql-workbench.com project to show resultsets from DuckDB WASM (via Arrow).

When I run different queries, I sometimes see some strange behavior (no scrolling possible, view not updating etc.). Once I click on reset in the component, everything works again. Unfortunately I failed to understand how this can be achieved programmatically...

Basically, I run the following code once a query succeeded:

// Load Apache Arrow data as table
const table = await worker.table(buffer);

// Load table
await viewerRef.current.load(table);

The schema of the Arrow data in buffer can change with every query. How can I programmatically reset the table's view, so that the same thing happens internally as pressing the "Reset" button in the component itself=

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions