fix: 判断 defer tree 条件补充 (#6060)

This commit is contained in:
sansiro 2023-01-12 17:49:05 +08:00 committed by GitHub
parent 6ca4148ea9
commit 41b86be11d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,7 +255,11 @@ export class BaseTransferRenderer<
// 是否是有懒加载的树,这时不能将 value 添加到 options。因为有可能 value 在懒加载结果中
const isTreeDefer =
selectMode === 'tree' &&
(!!deferApi || !!findTree(options, (option: Option) => option.deferApi));
(!!deferApi ||
!!findTree(
options,
(option: Option) => option.deferApi || option.defer
));
isTreeDefer === true ||
((newOptions.length > options.length || optionModified) &&