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

enhancement: persistence setting #3540

Merged
merged 2 commits into from
Dec 17, 2024
Merged

Conversation

Paul-Bob
Copy link
Contributor

@Paul-Bob Paul-Bob commented Dec 17, 2024

Description

The persistence configuration enables retention of specific UI settings, such as pagination and static filters, across user interactions.

Configuration

To set the :driver for persistence, configure it as follows:

config.persistence = { driver: :session }

# Or

config.persistence = -> do
  { driver: :session }
end

Behavior

  • Associations Pagination: Keeps the pagination state for associated records.
  • Static Filters: Retains static filter configurations applied by the user.

By setting :driver to :session, these configurations will persist within the user's session, maintaining their state across requests while the session remains active.

Warning

config.cache_resource_filters is obsolete
The config.cache_resource_filters option has been replaced by config.persistence.

If you previously used:

config.cache_resource_filters = true

Replace it with:

config.persistence = { driver: :session }

This ensures the same functionality, preserving resource filters (and pagination state) within the session.

Checklist:

Copy link

codeclimate bot commented Dec 17, 2024

Code Climate has analyzed commit 2f97b84 and detected 0 issues on this pull request.

View more on Code Climate.

@Paul-Bob Paul-Bob self-assigned this Dec 17, 2024
@Paul-Bob Paul-Bob added the Enhancement Not necessarily a feature, but something has improved label Dec 17, 2024
@Paul-Bob Paul-Bob merged commit f35feeb into main Dec 17, 2024
20 checks passed
@Paul-Bob Paul-Bob deleted the enhancement/persistance_setting branch December 17, 2024 17:36
Copy link
Contributor

This PR has been merged into main. The functionality will be available in the next release.

Please check the release guide for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Not necessarily a feature, but something has improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant