@propeller-commerce/propeller-v2-react-ui 0.15.0 → 0.15.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.
- package/CHANGELOG.md +27 -0
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9368,7 +9368,10 @@ function GridFilters(rawProps) {
|
|
|
9368
9368
|
return filter?.attributeDescription?.name || "";
|
|
9369
9369
|
}
|
|
9370
9370
|
function getFilterTitle(filter) {
|
|
9371
|
-
|
|
9371
|
+
const descriptions = filter?.attributeDescription?.descriptions;
|
|
9372
|
+
const lang = props.language?.toUpperCase();
|
|
9373
|
+
const match = lang ? descriptions?.find((d) => d?.language?.toUpperCase() === lang) : void 0;
|
|
9374
|
+
return match?.value || descriptions?.[0]?.value || filter?.attributeDescription?.name || "";
|
|
9372
9375
|
}
|
|
9373
9376
|
function getFilteredFilters() {
|
|
9374
9377
|
const list = props.filters ?? [];
|
|
@@ -9467,7 +9470,7 @@ function GridFilters(rawProps) {
|
|
|
9467
9470
|
function getCount(option) {
|
|
9468
9471
|
const c = option?.count || 0;
|
|
9469
9472
|
const ca = option?.countActive || 0;
|
|
9470
|
-
return
|
|
9473
|
+
return ca > 0 ? ca : c;
|
|
9471
9474
|
}
|
|
9472
9475
|
function getMinBound() {
|
|
9473
9476
|
return props.priceMin || 0;
|