Fix react fragments not having a key
.
Co-authored-by: Or Fleisher <fleisher.or@gmail.com>
This commit is contained in:
parent
b98c5d86b6
commit
2d3466ebfe
1 changed files with 3 additions and 7 deletions
|
@ -73,14 +73,10 @@ export const ExtensionToolbar: React.FC<{toolbarId: string}> = ({
|
||||||
if (!extension || !extension.toolbars?.[toolbarId]) continue
|
if (!extension || !extension.toolbars?.[toolbarId]) continue
|
||||||
|
|
||||||
groups.push(
|
groups.push(
|
||||||
<>
|
<React.Fragment key={'extensionToolbar-' + extension.id}>
|
||||||
{isAfterFirstGroup ? <GroupDivider></GroupDivider> : undefined}
|
{isAfterFirstGroup ? <GroupDivider></GroupDivider> : undefined}
|
||||||
<ExtensionToolsetRender
|
<ExtensionToolsetRender extension={extension} toolbarId={toolbarId} />
|
||||||
extension={extension}
|
</React.Fragment>,
|
||||||
key={'extensionToolbar-' + extension.id}
|
|
||||||
toolbarId={toolbarId}
|
|
||||||
/>
|
|
||||||
</>,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
isAfterFirstGroup = true
|
isAfterFirstGroup = true
|
||||||
|
|
Loading…
Reference in a new issue