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:
Peter Macdonald
2022-10-02 16:28:33 +02:00
parent 169420074c
commit 98ae18b68f
2 changed files with 7 additions and 2 deletions
@@ -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' && (