react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

ColumnResizer won't let go of focus with empty rows

Open rostero1 opened this issue 1 year ago โ€ข 1 comments

Provide a general summary of the issue here

Once the column resizer gains focus it will not let go of that focus and you can't tab or use your arrow keys to escape. This only happens when there are no rows passed to the table.

๐Ÿค” Expected Behavior?

It should let go of focus.

๐Ÿ˜ฏ Current Behavior

It steals focus.

๐Ÿ’ Possible Solution

No response

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

https://stackblitz.com/edit/vitejs-vite-c1a5kl?file=tailwind.config.js,src%2Findex.css,src%2FApp.tsx&terminal=dev

Version

latest stable react-aria-components

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Mac

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

rostero1 avatar Jun 14 '24 17:06 rostero1

Thanks for the issue. I see it in our storybook too if I alter https://github.com/adobe/react-spectrum/blob/4a8b24028308831a06a2450e6975b8816406315f/packages/react-aria-components/stories/Table.stories.tsx#L103 to have an empty array.

Even if I don't arrow key to the resizer, if I try to tab through, it goes to the resizer, which it doesn't when there are items.

I couldn't work around it with an empty state.

I'm not sure why it's happening, will need some investigation

snowystinger avatar Jun 14 '24 23:06 snowystinger