Skip to content

Commit d3061e9

Browse files
WangQianliangzfy0701
authored andcommitted
fix(code): clear import project input after submit (#32970)
1 parent 4245a7b commit d3061e9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

x-pack/plugins/code/public/components/admin_page/import_project.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class CodeImportProject extends React.PureComponent<
4646

4747
public submitImportProject = () => {
4848
this.props.importRepo(this.state.value);
49+
this.setState({ value: '' });
4950
};
5051

5152
public render() {

x-pack/plugins/code/public/components/admin_page/project_tab.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ class CodeProjectTab extends React.PureComponent<Props, State> {
134134

135135
public submitImportProject = () => {
136136
this.props.importRepo(this.state.repoURL);
137+
this.setState({ repoURL: '' });
137138
};
138139

139140
public renderImportModal = () => {

0 commit comments

Comments
 (0)