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

OBPIH-6490 Validations on pick page buttons #4685

Merged
merged 1 commit into from
Jun 25, 2024
Merged

OBPIH-6490 Validations on pick page buttons #4685

merged 1 commit into from
Jun 25, 2024

Conversation

kchelstowski
Copy link
Collaborator

No description provided.

Comment on lines +743 to +745
onClick: () => {
this.clearPicklist();
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

could this be shortened to:

Suggested change
onClick: () => {
this.clearPicklist();
},
onClick: this.clearPicklist

?

@@ -906,7 +951,7 @@ class PickPage extends Component {
</a>
<button
type="button"
onClick={() => this.clearPicklist()}
onClick={() => this.confirmClearPicklist()}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
onClick={() => this.confirmClearPicklist()}
onClick={this.confirmClearPicklist}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@alannadolny this might be a shortcut, but I believe I explained once, that I don't like passing arguments that are not used in a method.
Your suggestion would make this evaluate to:

onClick={(e) => this.confirmClearPicklist(e)}

even though we do not expect to pass any param to this method.
Why I remember this is that once, I gave you the opposite suggestion in a PR 😆

@awalkowiak awalkowiak merged commit 312fe2a into develop Jun 25, 2024
5 checks passed
@awalkowiak awalkowiak deleted the OBPIH-6490 branch June 25, 2024 08:10
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.

None yet

3 participants