Просмотр исходного кода

fix(admin-ui): Fix case sensitivity in product variant filter

Michael Bromley 4 лет назад
Родитель
Сommit
02f9995563

+ 2 - 2
packages/admin-ui/src/lib/catalog/src/components/product-detail/product-detail.component.ts

@@ -149,8 +149,8 @@ export class ProductDetailComponent
                     ? variants.filter(v => {
                     ? variants.filter(v => {
                           const lcTerm = term.toLocaleLowerCase();
                           const lcTerm = term.toLocaleLowerCase();
                           return (
                           return (
-                              v.name.toLocaleLowerCase().includes(term) ||
-                              v.sku.toLocaleLowerCase().includes(term)
+                              v.name.toLocaleLowerCase().includes(lcTerm) ||
+                              v.sku.toLocaleLowerCase().includes(lcTerm)
                           );
                           );
                       })
                       })
                     : variants;
                     : variants;