Merge pull request #12631 from kjuulh/feature/require-valid-owner-in-owner-picker
Add allowArbitraryValues to <OwnerPicker />
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Add allowArbitraryValues for <OwnerPicker /> to provide input validation. This makes it a better experience of users, as they can now expect the values they enter to correspond to a valid owner. This is set to the default behavior by default.
|
||||
@@ -169,6 +169,8 @@ export const OwnerPickerFieldExtension: FieldExtensionComponent<
|
||||
|
||||
// @public
|
||||
export interface OwnerPickerUiOptions {
|
||||
// (undocumented)
|
||||
allowArbitraryValues?: boolean;
|
||||
// (undocumented)
|
||||
allowedKinds?: string[];
|
||||
}
|
||||
|
||||
@@ -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