File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
x-pack/plugins/code/public/components/admin_page Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -77,22 +77,24 @@ interface Props {
7777}
7878interface State {
7979 showImportProjectModal : boolean ;
80+ importLoading : boolean ;
8081 settingModal : { url ?: string ; uri ?: string ; show : boolean } ;
8182 repoURL : string ;
8283 sortOption : SortOptionsValue ;
8384}
8485
8586class CodeProjectTab extends React . PureComponent < Props , State > {
8687 public static getDerivedStateFromProps ( props : Props , state : State ) {
87- if ( state . showImportProjectModal && ! props . importLoading ) {
88- return { showImportProjectModal : false } ;
88+ if ( state . importLoading && ! props . importLoading ) {
89+ return { showImportProjectModal : false , importLoading : props . importLoading } ;
8990 }
90- return null ;
91+ return { importLoading : props . importLoading } ;
9192 }
9293
9394 constructor ( props : Props ) {
9495 super ( props ) ;
9596 this . state = {
97+ importLoading : false ,
9698 showImportProjectModal : false ,
9799 settingModal : { show : false } ,
98100 repoURL : '' ,
You can’t perform that action at this time.
0 commit comments