Skip to content

Commit b0e20bf

Browse files
author
jingzouzou
committed
chore: delete notes and change logic
1 parent dccd5d2 commit b0e20bf

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/OptionList.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,9 @@ const OptionList: React.ForwardRefRenderFunction<ReviseRefOptionListProps> = (_,
205205
const [preSearchValue] = pre;
206206
const [nextSearchValue, nextExcludeSearchExpandedKeys] = next;
207207

208-
if (
209-
preSearchValue === nextSearchValue ||
210-
// should not pass `loadData` when expandedKeys is not changed
211-
(!nextSearchValue && !nextExcludeSearchExpandedKeys)
212-
) {
213-
return false;
214-
}
215-
return true;
208+
return (
209+
preSearchValue !== nextSearchValue && !!(nextSearchValue || nextExcludeSearchExpandedKeys)
210+
);
216211
},
217212
);
218213

0 commit comments

Comments
 (0)