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

Allow Phlex::Turbo::Stream element to take arbitrary attributes #341

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

marcoroth
Copy link
Contributor

With the Introduction of Custom Turbo Stream Actions it's not mandatory to always just pass the action and target attributes on the <turbo-stream> element.

Since you can write actions which don't target any elements you also don't need to specify the target or targets attribute (right now with Phlex 0.5 you also wouldn't be able to pass over a targets attribute).

Additionally, you need to be able to pass any attribute to the <turbo-stream> element so you can use custom attributes in your custom action.

For more context: hotwired/turbo-rails#375 and hotwired/turbo-rails#373

@joeldrapper joeldrapper merged commit 16edeba into phlex-ruby:main Nov 16, 2022
@joeldrapper
Copy link
Collaborator

Makes sense. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants