You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When performing a search within a Lens and subsequently selecting "all" search results to execute an Action, the Action incorrectly applies to all records in the Lens rather than just the selected ones.
Steps to Reproduce:
Assume there are 100 records in the Lens.
Conduct a search by a specific name, which yields 5 results.
Click "Select all (5)" for these search results.
Execute an Action on these selected records.
Expected Behavior:
The Action should only affect these 5 models that were selected.
Current Behavior:
The Action impacts all 100 models in the Lens.
Code to reproduce the issue on a fresh Nova installation:
Lense query:
public static function query(LensRequest $request, $query)
{
return $request->withOrdering($request->withFilters(
$query
->where('status_id', 4)
));
}
Lense action:
public function actions(NovaRequest $request)
{
return [new Actions\ToCourier];
}
Action handle:
public function handle(ActionFields $fields, Collection $models)
{
$ids = $models->pluck('id')->toArray();
info($ids);
}
The text was updated successfully, but these errors were encountered:
Description:
When performing a search within a Lens and subsequently selecting "all" search results to execute an Action, the Action incorrectly applies to all records in the Lens rather than just the selected ones.
Steps to Reproduce:
Expected Behavior:
The Action should only affect these 5 models that were selected.
Current Behavior:
The Action impacts all 100 models in the Lens.
Code to reproduce the issue on a fresh Nova installation:
Lense query:
Lense action:
Action handle:
The text was updated successfully, but these errors were encountered: