react-spectrum
react-spectrum copied to clipboard
Update useListState.ts
fixing error : Cannot read properties of undefined (reading 'index')
Closes https://github.com/adobe/react-spectrum/issues/5817
โ Pull Request Checklist:
- [ ] Included link to corresponding React Spectrum GitHub Issue.
- [ ] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
- [ ] Filled out test instructions.
- [ ] Updated documentation (if it already exists for this component).
- [ ] Looked at the Accessibility Practices for this feature - Aria Practices
๐ Test Instructions:
๐งข Your Project:
GET_BUILD
Build successful! ๐
## API Changes
unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any', access: 'private' } unknown top level export { type: 'any', access: 'private' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'identifier', name: 'Column' } unknown top level export { type: 'identifier', name: 'Column' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' }
I'd like to get a test for this change if possible.
Hi, When will this pr merge?
Would you be able to provide a reproduction for the error? I'm worried something else is going on that we're going to be hiding.
I can't yet. I am trying to found out how to reproduce. Could you guess how the error might be reproduced based on the error?
The only things I see causing it are the cachedCollection becoming stale or the focusedKey is wrong somehow. Either way, I want to know if one of those things is happening because that seems like those might lead to other issues.