-
-
Notifications
You must be signed in to change notification settings - Fork 49.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Search crash in AutoComplete #25049
Conversation
@@ -46,7 +47,7 @@ const Search = React.forwardRef<unknown, SearchProps>((props, ref) => { | |||
return; | |||
} | |||
if (customOnSearch) { | |||
customOnSearch(inputRef.current.input.value, e); | |||
customOnSearch(inputRef.current?.input.value!, e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? 和 ! 感觉是矛盾的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
第一个一个是判断是否有 instance。第二个是有了 instance 一定会有 value。
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2dc3b70:
|
Codecov Report
@@ Coverage Diff @@
## master #25049 +/- ##
=======================================
Coverage 99.38% 99.38%
=======================================
Files 365 365
Lines 7294 7294
Branches 1990 2039 +49
=======================================
Hits 7249 7249
Misses 45 45
Continue to review full report at Codecov.
|
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
fix #25031
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge