RepoUrlPickerRepoName did not keep the input value

Use onInputChange instead of onChange for propagating the input evnet.

Previous version was used <Input /> .
In this case onChange was fired each input event.
But in <Autocomplete /> is not fired.

Signed-off-by: Hitoshi Kamezaki <kamezaki@ap-com.co.jp>
This commit is contained in:
Hitoshi Kamezaki
2024-10-22 14:09:39 +09:00
parent 16a6771821
commit 99471cd963
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': patch
---
fix(scaffolder): use onInputChange instead onChange in RepoUrlPickerRepoName because need to keep the input value when move focus.
@@ -67,7 +67,7 @@ export const RepoUrlPickerRepoName = (props: {
) : (
<Autocomplete
value={repoName}
onChange={(_, newValue) => {
onInputChange={(_, newValue) => {
onChange(newValue || '');
}}
options={availableRepos || []}