chore(dashboard): Fix missing React key errors (#22266)
This commit is contained in:
parent
969c9634f6
commit
4657250bcf
|
|
@ -90,7 +90,7 @@ const FilterControls: FC<FilterControlsProps> = ({
|
|||
const renderer = useCallback(
|
||||
({ id }: Filter | Divider) => {
|
||||
const index = filtersWithValues.findIndex(f => f.id === id);
|
||||
return <OutPortal node={portalNodes[index]} inView />;
|
||||
return <OutPortal key={id} node={portalNodes[index]} inView />;
|
||||
},
|
||||
[filtersWithValues, portalNodes],
|
||||
);
|
||||
|
|
@ -207,7 +207,7 @@ const FilterControls: FC<FilterControlsProps> = ({
|
|||
{portalNodes
|
||||
.filter((node, index) => filterIds.has(filtersWithValues[index].id))
|
||||
.map((node, index) => (
|
||||
<InPortal node={node}>
|
||||
<InPortal node={node} key={filtersWithValues[index].id}>
|
||||
{filterControlFactory(
|
||||
index,
|
||||
filterBarOrientation,
|
||||
|
|
|
|||
|
|
@ -76,7 +76,9 @@ export const ScopeRow = React.memo(({ filter }: FilterCardRowProps) => {
|
|||
? Object.values(scope)
|
||||
.flat()
|
||||
.map((element, index) => (
|
||||
<span>{index === 0 ? element : `, ${element}`}</span>
|
||||
<span key={element}>
|
||||
{index === 0 ? element : `, ${element}`}
|
||||
</span>
|
||||
))
|
||||
: t('None')}
|
||||
</RowValue>
|
||||
|
|
|
|||
Loading…
Reference in New Issue