Skip to content

[Feature request] ListData selection management convenience methods #7666

Open
@Faithfinder

Description

@Faithfinder

Provide a general summary of the feature here

I'd like equivalents of add and remove methods for selection.

😯 Current Behavior

Manual implementation like

let nextSelected = new Set(list.selectedKeys);
if (list.selectedKeys === "all") {
  nextSelected = new Set(initialItems.map((metric) => metric.id));
}
nextSelected.delete(metric.id);
list.setSelectedKeys(nextSelected);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions