diff --git a/src/react/virtual.mjs b/src/react/virtual.mjs index a9fb87e05..fb4a22b76 100644 --- a/src/react/virtual.mjs +++ b/src/react/virtual.mjs @@ -34,7 +34,7 @@ function renderVirtual(swiper, slides, virtualData) { return React.cloneElement(child, { swiper, style, - key: `slide-${index}`, + key: child.props.virtualIndex || child.key || `slide-${index}`, }); }); }