Skip to content

EuiTables enable selection management from outside of component #1077

@justinkambic

Description

@justinkambic

I'm using an EuiInMemoryTable and wanted to allow a parent component to cancel all selections in the nested table. At the moment I can replace the array I'm maintaining in the parent component and updating on the table's onSelectionChange prop, but I can't tell the table to deselect items via props.

It would be useful to be able to tell a table to update the selected items:

render() {
  const { items } = this.state;
  return <EuiInMemoryTable items={items} selectedItems={[]} />;
}

We can presently allow the user to simply use the table's top selection box to deselect all items, but in some cases we may want to clear the selection automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions