From 5d16133a93b4ef4c1c171a63fc8a976d392a0bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frane=20Poli=C4=87?= <16856471+fPolic@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:55:37 +0200 Subject: [PATCH] fix(dashboard): PL creation - customers table customers count (#9237) **What** - display the number of customers in a group in the price list create flow --- CLOSES https://github.com/medusajs/medusa/issues/9210 FIXES CC-517 --- .../price-list-customer-group-rule-form.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/admin/dashboard/src/routes/price-lists/common/components/price-list-customer-group-rule-form/price-list-customer-group-rule-form.tsx b/packages/admin/dashboard/src/routes/price-lists/common/components/price-list-customer-group-rule-form/price-list-customer-group-rule-form.tsx index 89ac742325..7819de8405 100644 --- a/packages/admin/dashboard/src/routes/price-lists/common/components/price-list-customer-group-rule-form/price-list-customer-group-rule-form.tsx +++ b/packages/admin/dashboard/src/routes/price-lists/common/components/price-list-customer-group-rule-form/price-list-customer-group-rule-form.tsx @@ -59,9 +59,12 @@ export const PriceListCustomerGroupRuleForm = ({ prefix: PREFIX, }) const { customer_groups, count, isLoading, isError, error } = - useCustomerGroups(searchParams, { - placeholderData: keepPreviousData, - }) + useCustomerGroups( + { ...searchParams, fields: "customers.id" }, + { + placeholderData: keepPreviousData, + } + ) const updater: OnChangeFn = (value) => { const state = typeof value === "function" ? value(rowSelection) : value