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
This commit is contained in:
Frane Polić
2024-09-23 10:55:37 +02:00
committed by GitHub
parent 39034e2249
commit 5d16133a93

View File

@@ -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<RowSelectionState> = (value) => {
const state = typeof value === "function" ? value(rowSelection) : value