forked from github/dataease
Merge pull request #11204 from dataease/pr@dev-v2_st
fix(查询组件): 文本搜索条件设置为必填项后,输入搜索内容依然提示需要设置选项值
This commit is contained in:
commit
ebcc0113fe
@ -233,10 +233,10 @@ const queryDataForId = id => {
|
||||
if (conditionType === 0) {
|
||||
requiredName = conditionValueF === '' ? next.name : ''
|
||||
} else {
|
||||
requiredName = [conditionValueF || '', conditionValueS || ''].filter(ele => ele !== '')
|
||||
.length
|
||||
? next.name
|
||||
: ''
|
||||
requiredName =
|
||||
[conditionValueF || '', conditionValueS || ''].filter(ele => ele !== '').length < 2
|
||||
? next.name
|
||||
: ''
|
||||
}
|
||||
} else if (
|
||||
(Array.isArray(next.selectValue) && !next.selectValue.length) ||
|
||||
@ -458,10 +458,10 @@ const queryData = () => {
|
||||
if (conditionType === 0) {
|
||||
requiredName = conditionValueF === '' ? next.name : ''
|
||||
} else {
|
||||
requiredName = [conditionValueF || '', conditionValueS || ''].filter(ele => ele !== '')
|
||||
.length
|
||||
? next.name
|
||||
: ''
|
||||
requiredName =
|
||||
[conditionValueF || '', conditionValueS || ''].filter(ele => ele !== '').length < 2
|
||||
? next.name
|
||||
: ''
|
||||
}
|
||||
} else if (
|
||||
(Array.isArray(next.selectValue) && !next.selectValue.length) ||
|
||||
|
@ -237,7 +237,12 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
|
||||
|
||||
const isTree = +displayType === 9
|
||||
|
||||
if (timeType === 'dynamic' && [1, 7].includes(+displayType) && firstLoad) {
|
||||
if (
|
||||
timeType === 'dynamic' &&
|
||||
[1, 7].includes(+displayType) &&
|
||||
firstLoad &&
|
||||
defaultValueCheck
|
||||
) {
|
||||
if (+displayType === 1) {
|
||||
selectValue = getDynamicRange(item)
|
||||
item.defaultValue = new Date(selectValue[0])
|
||||
|
Loading…
Reference in New Issue
Block a user