Skip to content

Pre-Selected Rows? #150

Description

@evanVerinomics

I'm trying to figure out how to keep rows selected in a table even after the data refreshes every 10 minutes. Here’s what I’ve got so far:

function onSelectChange(action, state) {
console.log('state: ', state);
console.log('selectedRowIds: ', selectedRowIds);
let { ids: selectedIds } = state;
// let selectedIds = selectedRowIds; // tried this, doesn't work!
console.log("selected ids: ", selectedIds);
console.log("type: ", action.type);
...
}

I have an array called selectedRowIds with IDs like [1, 3, 6], but I'm stuck on how to use it to initialize selected rows when the data reloads. Right now, whenever the app pulls new data (which is every 10 minutes), all the previously selected rows lose their checked status.

Does anyone have any tips on how to maintain the selection status through data refreshes? Thanks for any help you can offer!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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