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

CB-172: Reset form when user clicks ‘Search’ - Saved #158

Merged
merged 1 commit into from
Nov 9, 2017

Conversation

joel-ace
Copy link
Contributor

@joel-ace joel-ace commented Nov 7, 2017

JIRA TICKET NAME:

Reset form when user clicks ‘Search’ - Saved

SUMMARY:

This PR ensures that on the "Saved" tab, the form is reset when the Search button is clicked

* @return {undefined}
*/
handleReset() {
this.state = {

Choose a reason for hiding this comment

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

Do not mutate state directly. Use setState() react/no-direct-mutation-state

@coveralls
Copy link

Coverage Status

Coverage remained the same at 75.0% when pulling 53cbc33 on joel-ace:CB-172 into 569d176 on openmrs:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 75.0% when pulling fdcde9e on joel-ace:CB-172 into 569d176 on openmrs:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 75.0% when pulling 15d5455 on joel-ace:CB-172 into 569d176 on openmrs:master.

Copy link

@andela-dbamidele andela-dbamidele left a comment

Choose a reason for hiding this comment

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

Great Job! 👍

Copy link

@kwahalf kwahalf left a comment

Choose a reason for hiding this comment

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

looks good

@cnagadya
Copy link

cnagadya commented Nov 8, 2017

Good work @joel-ace . Since you are already working on this file, take a look at this article that was shared with the OpenMRs devs in September regarding code comments

@joel-ace
Copy link
Contributor Author

joel-ace commented Nov 8, 2017

Thank's @cnagadya I've read that article before. I didn't take out those comments for two reasons:

  • The comments are quite descriptive and help with a quick start. Considering that there's a greater possibility of devs that are new to JS working on the project, I don't think it's a bad idea having them there. Also, the comment to code ratio on this file is really low
  • I didn't add them. I really don't like taking things out of an existing codebase except it's to improve the performance, or it's the decision of the project stakeholders. I've reached out to @dkayiwa and @LWanjiru about this

@dkayiwa
Copy link
Member

dkayiwa commented Nov 8, 2017

@cnagadya that is a very good way of checking against our guidelines! 👍
@joel-ace can you share with that rest of the team what we have agreed upon in regards to this?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 75.0% when pulling 12adc5c on joel-ace:CB-172 into 569d176 on openmrs:master.

@dkayiwa dkayiwa merged commit 7b39ae7 into openmrs:master Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants