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

WebSockets / action_cable support? #441

Open
hdbreaker opened this issue Feb 27, 2023 · 2 comments
Open

WebSockets / action_cable support? #441

hdbreaker opened this issue Feb 27, 2023 · 2 comments

Comments

@hdbreaker
Copy link

hdbreaker commented Feb 27, 2023

Hi guys?

I love Trestle, but the lack of documentation some times drives me crazy.
There is a way to refresh a view when an event happen in other application point? like "real time" stuff?

For example:

A real-time counter that grows up when users click in a button

@hdbreaker hdbreaker changed the title WebSockets / action_cable suport? WebSockets / action_cable support? Feb 27, 2023
@hdbreaker
Copy link
Author

Do you maybe support Hotwire? how can I get Realtime at my dashboard?

@hdbreaker
Copy link
Author

Thinking about how to solve this issue, I was looking that I can use /app/assets/javascripts/trestle/custom.js to poll or connect to ActionCable. Now I'm able to trigger a refresh of the page if a new record is created.

I want to extend this to refresh the frontend data that Trestle is using to populate the view, how can I access/update/overwrite Trestle data object that is used to populate the view from js? There is a way to do that?

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