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

Rename event handler prop for Button component #289

Merged
merged 21 commits into from
Aug 30, 2023
Merged

Rename event handler prop for Button component #289

merged 21 commits into from
Aug 30, 2023

Conversation

Ryukemeister
Copy link
Contributor

No description provided.

@Ryukemeister Ryukemeister changed the title Rename event handler prop for Button component Rename event handler prop for Button component Aug 19, 2023
Copy link
Member

@niwsa niwsa left a comment

Choose a reason for hiding this comment

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

Good catch 👍

@niwsa
Copy link
Member

niwsa commented Aug 20, 2023

Seeing some issues while testing the Connections component with the changes ...

@Ryukemeister
Copy link
Contributor Author

Seeing some issues while testing the Connections component with the changes ...

Made some tweaks so should hopefully fix the issues now!

@niwsa
Copy link
Member

niwsa commented Aug 21, 2023

The generated code for "react" at

<form onSubmit={state.saveSSOConnection} method='post'>

is not invoking the handler

Screenshot 2023-08-22 at 12 23 23 AM

I guess the takeaway is we should stick to (event) => handler(event) for handlers on native elements like form, input, button etc. So onSubmit={(event) => state.saveSSOConnection(event)} fixes it.

@niwsa
Copy link
Member

niwsa commented Aug 21, 2023

The vue build shows some errors.

@Ryukemeister
Copy link
Contributor Author

The generated code for "react" at

<form onSubmit={state.saveSSOConnection} method='post'>

is not invoking the handler
Screenshot 2023-08-22 at 12 23 23 AM
I guess the takeaway is we should stick to (event) => handler(event) for handlers on native elements like form, input, button etc. So onSubmit={(event) => state.saveSSOConnection(event)} fixes it.

That's strange because I actually tested that piece and it was working for me but yes better to use (event) => handler(event) there.

@niwsa
Copy link
Member

niwsa commented Aug 22, 2023

That's strange because I actually tested that piece and it was working for me but yes better to use (event) => handler(event) there.

It's doing a browser submission to the page instead of the API route.

@niwsa niwsa merged commit b862523 into main Aug 30, 2023
@niwsa niwsa deleted the rename-handler branch August 30, 2023 07:05
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