Skip to content
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

(refactor) 03-2973: Remove dead code from the results viewer implementation #1751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mccarthyaaron
Copy link
Contributor

Summary

Remove dead code from the results viewer implementation

Related Issue

https://openmrs.atlassian.net/browse/O3-2973

Copy link
Contributor

@chimanwadike chimanwadike left a comment

Choose a reason for hiding this comment

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

@mccarthyaaron any idea this PR may be failing e2e tests?
Does it pass the e2e tests when executed on your local, please?

Comment on lines 44 to +45
const handleInputChange = useCallback(
(e) => {
setSearchTerm(searchTerm);
(searchTerm) => {
Copy link
Member

Choose a reason for hiding this comment

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

What is the reason for this change?
Changing the event to a string will not work, until you make change in the said onClick function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vasharma05 should I revert it to the original? Also help explain abit more as I haven't understood what you mean by the "the said onClick function". But this was my thought process: When the such term changes, the handleInputChange function is called with the search term passed as an argument. We then use that search term to get the filtered results. Previously 'e' was not being used anywhere in the handleInputChange function and I didn't understand why we are using an event as a parameter yet handleInputChange is being passed a string. Also though that maybe setting the search term( setSearchTerm(searchTerm) ) to the same value is kinda redudant. Thats how I thought about it. I am willing to be corrected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants