tabs
tabs copied to clipboard
option to disable key events
I think a boolean prop that enables/disables the key event listeners would make a great addition. If you agree I'm happy to create a PR :)
Your use case?
Hi, I would find this useful as well. I'm using the Antd framework, which builds on top of rc-tabs
.
I need to de-activate the rc-tabs
keyboard shortcut because I want to implement my own. At the moment when the keyboard shortcuts are pressed, both my custom key handler and the rc-tabs
handler are called and the tabs component switches by two tabs instead of one.
Also, the rc-tabs
keyboard shortcut only seem to work when the component is focused 🤔
Thanks!
@callodacity whould you like to give us a PR?
According to me, we had better follow W3C's suggestion.
So, I don't know why you need to implement your own.
If you find any conflict between rc-tabs
and W3C's suggestion, just PR to modify it, thanks.
@benjycui, found a conflict with W3C. It advises against binding up and down arrow keys on horizontal tabs: "If the tab list is horizontal, it does not listen for Down Arrow or Up Arrow so those keys can provide their normal browser scrolling functions even when focus is inside the tab list." W3C