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

[LiveComponent] Unable to detect which button was clicked #2582

Open
toby-griffiths opened this issue Feb 20, 2025 · 2 comments
Open

[LiveComponent] Unable to detect which button was clicked #2582

toby-griffiths opened this issue Feb 20, 2025 · 2 comments
Labels
Bug Bug Fix Status: Waiting Feedback Needs feedback from the author

Comments

@toby-griffiths
Copy link

I've set up a LiveForm to perform live validation on our form, however I can't work out any way to detect which button the user has clicked, as the data coming through to the server is always null for the submitted data on any of the clicked or un-clicked buttons.

Am I doing something wrong, or is this a known limitation of the Live components?

@toby-griffiths toby-griffiths added the Bug Bug Fix label Feb 20, 2025
@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Feb 20, 2025
@toby-griffiths
Copy link
Author

I've also tried creating an custom type that renders <input type="submit" value="test"/> but this didn't work either.

It looks like it's the valueStore that is missing any values for the buttons, but I can't easily tell where this is updated from, or whether there's any way to modify the values before they're sent to the server.

@smnandre
Copy link
Member

Could you share your template with us ?

@smnandre smnandre added Status: Waiting Feedback Needs feedback from the author and removed Status: Needs Review Needs to be reviewed labels Feb 21, 2025
@smnandre smnandre changed the title Unable to detect which button was clicked as submitted data for button is always null [LiveComponent] Unable to detect which button was clicked Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix Status: Waiting Feedback Needs feedback from the author
Projects
None yet
Development

No branches or pull requests

3 participants