fix(dashboard): Add default value to inventory item combobox (#10412)
**What** - Resolves CMRC-761 - Fixes TS errors in the same file. Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
18583ed567
commit
e8f4f7ea2b
@@ -192,12 +192,15 @@ export const useUpdateProductVariantsBatch = (
|
||||
|
||||
export const useProductVariantsInventoryItemsBatch = (
|
||||
productId: string,
|
||||
options?: UseMutationOptions<any, FetchError, any>
|
||||
options?: UseMutationOptions<
|
||||
HttpTypes.AdminBatchProductVariantInventoryItemResponse,
|
||||
FetchError,
|
||||
HttpTypes.AdminBatchProductVariantInventoryItemRequest
|
||||
>
|
||||
) => {
|
||||
return useMutation({
|
||||
mutationFn: (
|
||||
payload: HttpTypes.AdminBatchProductVariantInventoryItemRequest
|
||||
) => sdk.admin.product.batchVariantInventoryItems(productId, payload),
|
||||
mutationFn: (payload) =>
|
||||
sdk.admin.product.batchVariantInventoryItems(productId, payload),
|
||||
onSuccess: (data: any, variables: any, context: any) => {
|
||||
queryClient.invalidateQueries({ queryKey: variantsQueryKeys.lists() })
|
||||
queryClient.invalidateQueries({ queryKey: variantsQueryKeys.details() })
|
||||
|
||||
@@ -50,6 +50,7 @@ export const useComboboxData = <
|
||||
enabled: !!defaultValue,
|
||||
})
|
||||
|
||||
|
||||
const { data, ...rest } = useInfiniteQuery({
|
||||
queryKey: [...queryKey, query],
|
||||
queryFn: async ({ pageParam = 0 }) => {
|
||||
|
||||
Reference in New Issue
Block a user