Open
Description
Describe the bug
Searchable do not respect the field scope.
Steps to Reproduce
Steps to reproduce the behavior:
- Inside team resource add this field configuration:
field :memberships,
as: :has_many,
searchable: true,
attach_scope: -> do
query.where.not(user_id: parent.id).or(query.where(user_id: nil))
end,
scope: -> { query.where(id: [45, 44, 43]) }
- Go to team show page and see only 3 records on table
- Click to search on table and notice that more than 3 records appear on search
Expected behavior & Actual behavior
The field scope should be applied on the search scope
Models and resource files
System configuration
Avo version:
2.37.0
Rails version:
Ruby version:
License type:
- Community
- Pro
Are you using Avo monkey patches, overriding views or view components?
- Yes. If so, please post code samples.
- No
Screenshots or screen recordings
Additional context
Impact
- High impact (It makes my app un-usable.)
- Medium impact (I'm annoyed, but I'll live.)
- Low impact (It's really a tiny thing that I could live with.)
Urgency
- High urgency (I can't continue development without it.)
- Medium urgency (I found a workaround, but I'd love to have it fixed.)
- Low urgency (It can wait. I just wanted you to know about it.)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
In Progress