ordering-ui-external 2.7.1 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -237,7 +237,9 @@ var ProductItemAccordion = function ProductItemAccordion(props) {
|
|
|
237
237
|
className: "ingredient",
|
|
238
238
|
key: ingredient.id
|
|
239
239
|
}, /*#__PURE__*/_react.default.createElement("span", null, t('NO', 'No'), " ", ingredient.name));
|
|
240
|
-
})), productInfo().options.length > 0 && /*#__PURE__*/_react.default.createElement(_styles.ProductOptionsList, null, productInfo().options.
|
|
240
|
+
})), productInfo().options.length > 0 && /*#__PURE__*/_react.default.createElement(_styles.ProductOptionsList, null, productInfo().options.sort(function (a, b) {
|
|
241
|
+
return a.rank - b.rank;
|
|
242
|
+
}).map(function (option) {
|
|
241
243
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
242
244
|
key: option.id
|
|
243
245
|
}, /*#__PURE__*/_react.default.createElement("p", null, option.name), /*#__PURE__*/_react.default.createElement(_styles.ProductOptionsList, {
|
package/package.json
CHANGED
|
@@ -316,7 +316,7 @@ export const ProductItemAccordion = (props) => {
|
|
|
316
316
|
)}
|
|
317
317
|
{productInfo().options.length > 0 && (
|
|
318
318
|
<ProductOptionsList>
|
|
319
|
-
{productInfo().options.map(option => (
|
|
319
|
+
{productInfo().options.sort((a, b) => a.rank - b.rank).map(option => (
|
|
320
320
|
<li key={option.id}>
|
|
321
321
|
<p>{option.name}</p>
|
|
322
322
|
<ProductOptionsList className='suboption'>
|