Add allowArbitraryValues to <OwnerPicker />
This change makes the OwnerPicker able to validate that the selected option is one of the provided values. This should provide a smoother experience for users, as they now can only enter valid values on the client side None of the tests are changed, as this value is passed to MUI, which is the library containing the validation. Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -25,6 +25,7 @@ import { FieldExtensionComponentProps } from '../../../extensions';
|
||||
*/
|
||||
export interface OwnerPickerUiOptions {
|
||||
allowedKinds?: string[];
|
||||
allowArbitraryValues?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,6 +51,8 @@ export const OwnerPicker = (
|
||||
'User',
|
||||
]) as string[],
|
||||
defaultKind: 'Group',
|
||||
allowArbitraryValues:
|
||||
uiSchema['ui:options']?.allowArbitraryValues || true,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user