Commit 979ad42e by zhaochengxiang

模型目录搜索

parent fbb9ccaf
......@@ -440,6 +440,10 @@ const ModelTree = (props) => {
);
};
const onAutoCompleteChange = (value) => {
setSearchKeyword(value);
}
const onAutoCompleteSelect = (value, option) => {
const paths = value.split('/');
setSearchKeyword(paths[paths.length-1]);
......@@ -553,6 +557,7 @@ const ModelTree = (props) => {
style={{ marginBottom: 10, width: '100%' }}
onSelect={onAutoCompleteSelect}
onSearch={onAutoCompleteSearch}
onChange={onAutoCompleteChange}
onClear={() => { setSearchKeyword(''); }}
>
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment