From 48571f1bd2e0e5c91dd2ab968b322b149d034b9c Mon Sep 17 00:00:00 2001 From: Birk Johansson Date: Thu, 14 Nov 2024 13:49:43 +0100 Subject: [PATCH] fix(optionSetSelect): fix optionSet crashing with initialValue --- .../OptionSetSelect/useInitialOptionQuery.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/metadataFormControls/OptionSetSelect/useInitialOptionQuery.ts b/src/components/metadataFormControls/OptionSetSelect/useInitialOptionQuery.ts index cf981cb5..bd40bba4 100644 --- a/src/components/metadataFormControls/OptionSetSelect/useInitialOptionQuery.ts +++ b/src/components/metadataFormControls/OptionSetSelect/useInitialOptionQuery.ts @@ -4,7 +4,7 @@ import { SelectOption } from '../../../types' import { FilteredOptionSet } from './types' type InitialOptionSetQueryResult = { - optionSet: FilteredOptionSet + optionSets: FilteredOptionSet } const fields = ['id', 'displayName'] @@ -21,7 +21,7 @@ export function useInitialOptionQuery({ lazy: !initialSelected.current, variables: { id: selected, fields }, onComplete: (data: InitialOptionSetQueryResult) => { - const optionSet = data.optionSet + const optionSet = data.optionSets const { id: value, displayName: label } = optionSet onComplete({ value, label }) },