Update of OwnerPicker to pass correctly defaultNamespace value

Signed-off-by: Tomáš Tunkl <tomas.tunkl@avast.com>
This commit is contained in:
Tomáš Tunkl
2022-09-21 17:15:19 +02:00
parent aa49202de0
commit aa1f108fb3
@@ -44,6 +44,8 @@ export const OwnerPicker = (
...restProps
} = props;
const defaultNamespace = uiSchema['ui:options']?.defaultNamespace;
const ownerUiSchema = {
...uiSchema,
'ui:options': {
@@ -54,7 +56,7 @@ export const OwnerPicker = (
defaultKind: 'Group',
allowArbitraryValues:
uiSchema['ui:options']?.allowArbitraryValues ?? true,
defaultNamespace: uiSchema['ui:options']?.defaultNamespace ?? '',
...(defaultNamespace !== undefined ? { defaultNamespace } : {}),
},
};