How can the resource query be modified on an Infolist page?
Hi,
When loading a resource, the standard
select
uses *. On a table page, I can use modifyQueryUsing()
to modify the resource to suit the table's needs, but I don't see a way to do that with a View page that doesn't have a modifyQueryUsing()
method either on the Page or the Infolist.4 Replies
what would you like to modify in the view page?
Let's assume I have this hypothetical table DB table with these fields:
id
name, string
title, string
data, json
notes, json
details, json
The resource:
The Table on the List Page has the following on the Table component:
This limits the scope and doesn't load any of the json data. This work now.
On the view page, I'd like to modify the resource query to this:
This query includes
data
, but not notes
and details
.
And then on an additional custom page, I'd like to modify the resource query to this:
This query includes notes
and details
, but not data
.
If a DB table with a lot of fields, especially larger fields like TEXT of JSON, I'm trying to limit the scope on a page by page basis.
Was the above clear @Leandro Ferreira ?I guess you need to override the mount method in your ViewPage
This is the route I went with. I'd love your thoughts.