fix: filter issue when setting single-select field as title field in association select (#5581)

This commit is contained in:
Katherine 2024-11-05 10:10:13 +08:00 committed by GitHub
parent bb866fdde0
commit 812a2cb24a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,7 +82,8 @@ const InternalRemoteSelect = connect(
const operator = useMemo(() => {
if (targetField?.interface) {
return getInterface(targetField.interface)?.filterable?.operators[0].value || '$includes';
const initialOperator = getInterface(targetField.interface)?.filterable?.operators[0].value || '$includes';
return initialOperator !== '$eq' ? initialOperator : '$includes';
}
return '$includes';
}, [targetField]);