Skip to content

Commit 471df43

Browse files
bbb169afc163
andauthored
simplify loadDataFun return
Co-authored-by: afc163 <afc163@gmail.com>
1 parent b0e20bf commit 471df43

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/OptionList.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,7 @@ const OptionList: React.ForwardRefRenderFunction<ReviseRefOptionListProps> = (_,
197197
}));
198198

199199
const loadDataFun = useMemo(
200-
() => {
201-
return searchValue ? null : (loadData as any);
202-
},
200+
() => searchValue ? null : (loadData as any),
203201
[searchValue, treeExpandedKeys || expandedKeys],
204202
(pre, next) => {
205203
const [preSearchValue] = pre;

0 commit comments

Comments
 (0)