Tabs need key now
Summary: Because Tabs now depend on the selected node (i.e. some nodes have events, some don't) they need to use a key. Reviewed By: antonk52 Differential Revision: D44624658 fbshipit-source-id: 693983f6a82c090adae3a2e009873d903626ab75
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8f9bf978e1
commit
04911d9d85
@@ -49,8 +49,9 @@ export const Inspector: React.FC<Props> = ({nodes, metadata}) => {
|
||||
|
||||
return (
|
||||
<Layout.Container gap pad>
|
||||
<Tabs grow centered>
|
||||
<Tabs grow centered key={selectedNodeId}>
|
||||
<Tab
|
||||
key={'identity'}
|
||||
tab={
|
||||
<Tooltip title="Identity">
|
||||
<Layout.Horizontal center>
|
||||
@@ -62,6 +63,7 @@ export const Inspector: React.FC<Props> = ({nodes, metadata}) => {
|
||||
</Tab>
|
||||
|
||||
<Tab
|
||||
key={'attributes'}
|
||||
tab={
|
||||
<Tooltip title="Attributes">
|
||||
<Layout.Horizontal center>
|
||||
@@ -76,6 +78,7 @@ export const Inspector: React.FC<Props> = ({nodes, metadata}) => {
|
||||
/>
|
||||
</Tab>
|
||||
<Tab
|
||||
key={'layout'}
|
||||
tab={
|
||||
<Tooltip title="Layout">
|
||||
<Layout.Horizontal center>
|
||||
@@ -95,6 +98,7 @@ export const Inspector: React.FC<Props> = ({nodes, metadata}) => {
|
||||
</Tab>
|
||||
{events && (
|
||||
<Tab
|
||||
key={'events'}
|
||||
tab={
|
||||
<Tooltip title="Events">
|
||||
<Layout.Horizontal center>
|
||||
|
||||
Reference in New Issue
Block a user