Merge pull request #24615 from JeevaRamanathan/issue/multiEntityPicker_field

MultiEntityPicker field can be set as required
This commit is contained in:
Ben Lambert
2024-05-07 15:21:18 +02:00
committed by GitHub
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': patch
---
Fixed a bug where the `MultiEntityPicker` was not able to be set as required
@@ -173,7 +173,10 @@ export const MultiEntityPicker = (props: MultiEntityPickerProps) => {
FormHelperTextProps={{ margin: 'dense', style: { marginLeft: 0 } }}
variant="outlined"
required={required}
InputProps={params.InputProps}
InputProps={{
...params.InputProps,
required: formData.length === 0 && required,
}}
/>
)}
/>