Add some keys to elements
This commit is contained in:
parent
59cba2a952
commit
07e249faae
|
@ -552,7 +552,7 @@ var ProductPreview = function (_React$Component4) {
|
|||
|
||||
return wp.element.createElement(
|
||||
'div',
|
||||
{ className: 'product-preview' },
|
||||
{ className: 'product-preview', key: product.id + '-preview' },
|
||||
image,
|
||||
wp.element.createElement(
|
||||
'div',
|
||||
|
@ -1802,7 +1802,7 @@ var ProductSpecificSelectedProducts = withAPIData(function (props) {
|
|||
|
||||
productElements.push(wp.element.createElement(
|
||||
'li',
|
||||
{ className: 'wc-products-list-card__item' },
|
||||
{ className: 'wc-products-list-card__item', key: productData.id + '-specific-select-edit' },
|
||||
wp.element.createElement(
|
||||
'div',
|
||||
{ className: 'wc-products-list-card__content' },
|
||||
|
|
|
@ -340,7 +340,7 @@ class ProductPreview extends React.Component {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="product-preview">
|
||||
<div className="product-preview" key={ product.id + '-preview' } >
|
||||
{ image }
|
||||
<div className="product-title">{ product.name }</div>
|
||||
<div className="product-price" dangerouslySetInnerHTML={ { __html: product.price_html } } />
|
||||
|
|
|
@ -337,7 +337,7 @@ const ProductSpecificSelectedProducts = withAPIData( ( props ) => {
|
|||
const productData = PRODUCT_DATA[ productId ];
|
||||
|
||||
productElements.push(
|
||||
<li className="wc-products-list-card__item">
|
||||
<li className="wc-products-list-card__item" key={ productData.id + '-specific-select-edit' } >
|
||||
<div className="wc-products-list-card__content">
|
||||
<img src={ productData.images[0].src } />
|
||||
<span className="wc-products-list-card__content-item-name">{ productData.name }</span>
|
||||
|
|
Loading…
Reference in New Issue