We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5c94ae commit 36112feCopy full SHA for 36112fe
.changeset/wild-toys-melt.md
@@ -0,0 +1,5 @@
1
+---
2
+'react-image-previewer': patch
3
4
+
5
+fix: with the same key, `split`.
packages/core/src/ui/DragToolbar.tsx
@@ -261,10 +261,14 @@ export const DragToolbar: FC<DragToolbarProps> = ({
261
className={className}
262
>
263
<StyledBox>
264
- {items.map(item => {
+ {items.map((item, index) => {
265
if (typeof item === 'string') {
266
const Component = DragToolbarItemDefaultComponent[item]
267
if (!Component) return null
268
+ let key: string = item
269
+ if (key === 'split') {
270
+ key = `split-${index}`
271
+ }
272
return <Component key={item} {...props} />
273
}
274
const Component = item.component
0 commit comments