Fixed the allowedOwners from resetting everytime you leave the drop-down or enter stuff in the next input field this should fix #13730
Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com> Fixed the allowedOwners from resetting everytime you leave the drop-down or enter stuff in the next input field this should fix #13730 (added changeset) Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com> Better, improved, test passing fix for the bug Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com> Changed changeset file to ignore allowedOwners with backticks Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Fixed the `allowedOwners` from resetting itself when you make a selection or leave the Allowed Owners drop down and start typing in an input below it
|
||||
@@ -106,7 +106,7 @@ export const RepoUrlPicker = (
|
||||
if (allowedOwners.length > 0) {
|
||||
setState(prevState => ({
|
||||
...prevState,
|
||||
owner: allowedOwners[0],
|
||||
allowedOwners,
|
||||
}));
|
||||
}
|
||||
}, [setState, allowedOwners]);
|
||||
@@ -174,9 +174,9 @@ export const RepoUrlPicker = (
|
||||
{hostType === 'github' && (
|
||||
<GithubRepoPicker
|
||||
allowedOwners={allowedOwners}
|
||||
onChange={updateLocalState}
|
||||
rawErrors={rawErrors}
|
||||
state={state}
|
||||
onChange={updateLocalState}
|
||||
/>
|
||||
)}
|
||||
{hostType === 'gitlab' && (
|
||||
|
||||
Reference in New Issue
Block a user