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

fix: associations lookup list limit #311

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/3.0/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,3 +567,19 @@ end

<Image src="/assets/img/3_0/customization/click-row-to-view-record.gif" width="" height="" alt="Click to view record in Avo" />
</Option>

## Associations lookup list limit

<VersionReq version="3.14.0" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.14.0 is the current release version and associations_lookup_list_limitis not included in it.

We do a minor release on the first Tuesday of each month so 3.15.0 will include this feature. However, we’ll soon issue a patch release with some fixes, so it will be available starting from 3.14.1

Suggested change
<VersionReq version="3.14.0" />
<VersionReq version="3.14.1" />


By default, there is a limit of a 1000 records per query when listing the association options. This limit ensures that the page will not crash due to large collections.
Use `associations_lookup_list_limit` configuration to change the limit value.

```ruby{3}
# config/initializers/avo.rb
Avo.configure do |config|
config.associations_lookup_list_limit = 1000
end
```

<Image src="/assets/img/customization/associations-lookup-list-limit.png" width="1206" height="920" alt="Associations lookup list limit configuration" />
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.