davidtheclark / davidtheclark/react-aria-tabpanel
Id not being passed to the onChange function
- Dominant language
- JavaScript
- Stars
- 121
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Hi @davidtheclark! The library is great, thank you for open sourcing it!
I have been running into one issue. I was trying to replicate the stateless demo, and can get the tabs to switch. But the function being passed as the `onChange` prop is not being passed the `id` on `tabChange`. I imagine it is a n00b mistake, but any pointers would me much appreciated.
Here is what my render function works like -
``` javascript
return (
{renderTabHeadings()}
{renderTabContents()}
);
```
The `handleTabChange` function is not getting the `tabId` parameter. This is what that looks like:
``` javascript
handleTabChange = (newActiveTabId) => {
//TODO: change router here when updated
console.log(newActiveTabId); //is always undefined :(
};
```
Thank you!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.