Closed lucasob closed 2 years ago
One would expect hidden smart views to not be invoked at all when querying a list of model instances.
The smart fields are hidden from the response, however, they are all still calculated, but then filtered out of the response.
This is made clear in ListView::get where ListView::hand_smart_fields is called.
ListView::get
ListView::hand_smart_fields
Inside this function, all smart fields for the model are appended to the response, only to then be filtered out again by ListView::serialize
ListView::serialize
Support ticket raised: https://community.forestadmin.com/t/dont-load-smart-field-in-collection-view/5102
Expected behavior
One would expect hidden smart views to not be invoked at all when querying a list of model instances.
Actual behavior
The smart fields are hidden from the response, however, they are all still calculated, but then filtered out of the response.
This is made clear in
ListView::get
whereListView::hand_smart_fields
is called.Inside this function, all smart fields for the model are appended to the response, only to then be filtered out again by
ListView::serialize
Context
Support ticket raised: https://community.forestadmin.com/t/dont-load-smart-field-in-collection-view/5102