diff --git a/src/components/search/SearchForm.jsx b/src/components/search/SearchForm.jsx index 786770b..47f7439 100644 --- a/src/components/search/SearchForm.jsx +++ b/src/components/search/SearchForm.jsx @@ -69,7 +69,7 @@ export default observer((props) => { 'DepartmentList': { key: 'DepartmentList', transform: (value) => { - return Array.isArray(value) ? value.map((ele) => ele.key).join(',') : value ? value.key : ''; + return isEmpty(value) ? 'ALL': Array.isArray(value) ? value.map((ele) => ele.key).join(',') : value ? value.key : ''; }, default: '', }, @@ -259,7 +259,11 @@ function getFields(props) { item( 'DepartmentList', 99, - + ), @@ -323,7 +327,7 @@ function getFields(props) { item( 'operator', 99, - + item.value !== 'ALL'); + const __value = ['tags', 'multiple'].includes(_mode) ? (value.constructor === Object ? [value] : value) : undefined; + const _value = !['tags', 'multiple'].includes(_mode) + ? value || store?.webcode || undefined + : (__value || store?.webcode || []).filter((item) => String(item?.value || item.key).toLowerCase() !== 'all'); return (