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

reload_records not working with the Grid view #3718

Open
2 of 5 tasks
m7madmagdy opened this issue Mar 5, 2025 · 4 comments
Open
2 of 5 tasks

reload_records not working with the Grid view #3718

m7madmagdy opened this issue Mar 5, 2025 · 4 comments

Comments

@m7madmagdy
Copy link

Context

In the grid view type, if I use reload_records for any action, it's not working correctly and I must refresh the page manually

System configuration

Avo version: 3.17.9

Rails version: 8.0

Ruby version: 3.4.2

License type

  • Community
  • Pro
  • Advanced

Are you using Avo monkey patches, overriding views or view components?

  • Yes. If so, please post code samples.
  • No

Screenshots or screen recordings

@Deepanshu0211
Copy link

Avo reload_records Not Working in Grid View

Issue Description

In the grid view, calling reload_records does not refresh the records correctly. A manual page refresh is required.

System Configuration

  • Avo version: 3.17.9
  • Rails version: 8.0
  • Ruby version: 3.4.2
  • License type: Community / Pro / Advanced
  • Using monkey patches or custom views? No

Debugging Steps

✅ 1. Check Browser Console

  • Open DevTools (F12 → Console)
  • Look for JavaScript errors or network errors when reload_records is triggered

✅ 2. Verify Grid View Setup

  • Are you calling reload_records inside a custom action or controller?
  • Check if the method is being executed properly.

✅ 3. Check Avo Documentation & Source Code

✅ 4. Force Turbo to Work (If Using Hotwire)

Try manually forcing Turbo to refresh:

Turbo.visit(window.location.href, { action: "replace" })

or, soft trigger reload
Avo.reload()

@Paul-Bob
Copy link
Contributor

Paul-Bob commented Mar 6, 2025

Hi @m7madmagdy,

The reload_records action response is not expected to work in grid view. As stated in the docs, this option leverages Turbo Stream to refresh specific table rows in response to an action.

Thanks for reaching out! We'll discuss the possibility of extending this feature to work with other view types, such as grid

@Paul-Bob
Copy link
Contributor

Paul-Bob commented Mar 7, 2025

We'd love to merge a PR if you're up for contributing! I'd be happy to guide you through the process.

@m7madmagdy
Copy link
Author

Hi @Paul-Bob
Yes! I'd love to contribute!, Please guide me through the process, and let me know how I can help. I'm excited to contribute to Avo

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

No branches or pull requests

3 participants