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] this.component.emit() has data argument. What does it do? #1085

Closed
jorismak opened this issue Aug 30, 2023 · 1 comment
Closed

Comments

@jorismak
Copy link

As stated in the title,

if following the documentation to send live-component-events from Javascript, you use getComponent() to get a Component instance, and call emit() on that.
Then you use an attribute on the PHP side to trigger an action when that event is received.

The emit() call in Js has a 'data' argument. What does this do? Is it random data to be given to the event? If so, how can I access it from the PHP side of things?

@jorismak
Copy link
Author

Never mind, reading the docs is hard these days apparently :(.

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

No branches or pull requests

1 participant