react_autocomplete_solution#1174
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Changes are needed - Your implementation is missing two required features from the task description.
Issue 1: Missing delay prop
The task explicitly requires the delay to be "customizable via props with default value of 300ms", but the value is hardcoded on line 15. You need to accept delay as a prop with a default value of 300 and use it in your setTimeout instead of the hardcoded number.
Issue 2: Missing onSelected callback prop
The task requires passing the selected person to an onSelected callback passed via props. Currently, you only store the selection in internal state with setSelectedPerson. Add an onSelected?: (person: Person) => void prop and call it in your handleSelect function when a person is clicked.
Once you add these two props with proper TypeScript interfaces, your implementation should meet all the requirements. The core autocomplete logic and Bulma styling look correct.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation fully satisfies all task requirements. The delay prop now has a proper default value of 300ms and is correctly used in the debounce mechanism, and the onSelected callback prop is properly invoked when a person is selected from the dropdown. All checklist items have been successfully implemented, including the Bulma Dropdown structure, proper filtering logic, empty/spaces-only input handling, and React best practices with useMemo, useEffect, and correct state management. The component works as expected with all required functionality in place. Great work on addressing the previous review feedback!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
DEMO LINK