diff --git a/web/src/utils/elasticsearch.js b/web/src/lib/elasticsearch/util.js
similarity index 100%
rename from web/src/utils/elasticsearch.js
rename to web/src/lib/elasticsearch/util.js
diff --git a/web/src/pages/DataManagement/Document.js b/web/src/pages/DataManagement/Document.js
index 8180ef0e..e5446f92 100644
--- a/web/src/pages/DataManagement/Document.js
+++ b/web/src/pages/DataManagement/Document.js
@@ -8,7 +8,7 @@ import Editor, {monaco} from '@monaco-editor/react';
import moment from 'moment';
import {createDependencyProposals} from './autocomplete';
import InputSelect from '@/components/infini/InputSelect';
-import {getFields,getESAPI} from '@/utils/elasticsearch';
+import {getFields,getESAPI} from '@/lib/elasticsearch/util';
function findParentIdentifier(textUntilPosition){
let chars = textUntilPosition;
@@ -561,11 +561,14 @@ class Doucment extends React.Component {
})
}
return newItem;
+ });
+ this.indexSelEl && this.indexSelEl.setState({
+ value: [indices[0].value]
})
}
return (
- {(indices) ? ({this.indexSelEl=el}} options={indices} style={{width: 200, marginRight:5}} placeholder="please select a index">
+ {(indices && indices.length>0) ? ({this.indexSelEl=el}} defaultValue={[indices[0].value]} options={indices} style={{width: 200, marginRight:5}} placeholder="please select a index">
) : ''}
{/*{(indices) ? (