From 41accaed7b2260f9033701f048b5b65b01a6369d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 十一月 2023 15:42:19 +0800 Subject: [PATCH] 2023-11-21 --- src/tabviews/zshare/topSearch/index.jsx | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index 29db100..eda97f6 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -426,6 +426,7 @@ } resetSearch = (result) => { + let trigger = false let _searchlist = fromJS(this.state.searchlist).toJS().map(item => { if (['select', 'link', 'multiselect', 'checkcard', 'radio'].includes(item.type) && result[item.field] && result[item.field].length > 0) { let options = [] @@ -491,12 +492,23 @@ item.options = item.oriOptions } + if (item.$first && item.options.length > 0) { + item.initval = item.options[0].Value + trigger = true + } + return item }) this.setState({ searchlist: _searchlist }) + + if (trigger) { + setTimeout(() => { + this.handleSubmit() + }, 10) + } } recordChange = (val, defer, item) => { -- Gitblit v1.8.0