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

Refresh view/tabs under dialog after update/save #462

Open
eashman opened this issue Jun 5, 2024 · 2 comments
Open

Refresh view/tabs under dialog after update/save #462

eashman opened this issue Jun 5, 2024 · 2 comments

Comments

@eashman
Copy link

eashman commented Jun 5, 2024

Is there a way to force the view to refresh the tab/table under a dialog box after it is saved? This would also tie into the idea that after an edit you could optionally have the dialog close right away upon successful save.

I can't seem to find any examples that do this.

My issue is, I'm adding to the 1->many relation on a table and when i add the new item, i need to manually click refresh to see it in the main view on the source model.

@eashman
Copy link
Author

eashman commented Jun 5, 2024

In case someone sees this issue, I fixed it once I forced the master branch in my Gemfile.

I believe the problem was I had the Hotwire branch set in my code and this seems to be a bug in that particular branch.

I still would like to be able to dismiss the dialog on save/delete success optionally but at least the refresh appears to be working again on the master branch.

@spohlenz Just an FYI to test the refresh of the parent page on dialog save etc.

@spohlenz
Copy link
Member

spohlenz commented Jun 5, 2024

Is it possible that you've customized your index.html.erb for that admin? If so, you'll need to merge in the updates to https://github.com/TrestleAdmin/trestle/blob/hotwire/app/views/trestle/resource/index.html.erb#L12, in particular the index_turbo_frame.

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

2 participants