Fix missing key in tab container

This commit is contained in:
David Baker 2022-10-21 16:26:44 +01:00
parent 54fe2aa7a3
commit fa4b4eabdf

View file

@ -38,7 +38,7 @@ export function TabContainer<T extends object>(
<div className={classNames(styles.tabContainer, props.className)}>
<ul {...tabListProps} ref={ref} className={styles.tabList}>
{[...state.collection].map((item) => (
<Tab item={item} state={state} />
<Tab item={item} state={state} key={item.key} />
))}
</ul>
<TabPanel key={state.selectedItem?.key} state={state} />