Skip to content

react_autocomplete_solution#1174

Open
Banderos14 wants to merge 2 commits into
mate-academy:masterfrom
Banderos14:develop
Open

react_autocomplete_solution#1174
Banderos14 wants to merge 2 commits into
mate-academy:masterfrom
Banderos14:develop

Conversation

@Banderos14
Copy link
Copy Markdown

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/App.tsx Outdated
Comment thread src/App.tsx Outdated
Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants