MCPcopy Create free account
hub / github.com/adobe/react-spectrum / setSelectedKeys

Function setSelectedKeys

packages/react-stately/src/data/useListData.ts:194–199  ·  view source on GitHub ↗
(selectedKeys: Selection)

Source from the content-addressed store, hash-verified

192 let {cursor, getKey} = opts;
193 return {
194 setSelectedKeys(selectedKeys: Selection) {
195 dispatch(state => ({
196 ...state,
197 selectedKeys
198 }));
199 },
200 addKeysToSelection(selectedKeys: Selection) {
201 dispatch(state => {
202 if (state.selectedKeys === 'all') {

Callers 14

removeFunction · 0.70
toggleKeyFunction · 0.50
performFunction · 0.50
ListBoxExampleFunction · 0.50
onSelectionChangeFunction · 0.50
ExampleFunction · 0.50
Example2Function · 0.50
onActionFunction · 0.50
onBreadcrumbActionFunction · 0.50
TestComponentFunction · 0.50
ControlledTestFunction · 0.50
useActionBarContainerFunction · 0.50

Calls

no outgoing calls

Tested by 2

TestComponentFunction · 0.40
ControlledTestFunction · 0.40