filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
19.39k stars 2.97k forks source link

Missing search variable in AssociateAction.recordSelectOptionsQuery #14686

Open hsul4n opened 2 weeks ago

hsul4n commented 2 weeks ago

Package

filament/filament

Package Version

v3.2

Laravel Version

v11.9.0

Livewire Version

v3.5.4

PHP Version

PHP 8.3.0

Problem description

I noticed that recordSelectOptionsQuery function not having search variable which is important to customize query for example using custom scope query for searching https://github.com/filamentphp/filament/blob/d8c326d078a81e2aa720d0219d0be28490497206/packages/tables/src/Actions/AssociateAction.php#L202

Expected behavior

recordSelectOptionsQuery function must have search variable

Steps to reproduce

1- Add Filament\Tables\Actions\AssociateAction::make() action into table header actions. 2- Call $action->recordSelectOptionsQuery(fn($query, $search) => $query->customScope($search)).

Reproduction repository (issue will be closed if this is not valid)

https://github.com/filamentphp/demo

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

github-actions[bot] commented 2 weeks ago

Hey @hsul4n! We're sorry to hear that you've hit this issue. 💛

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

github-actions[bot] commented 2 weeks ago

Thank you for providing reproduction steps! Reopening the issue now.

hsul4n commented 1 hour ago

The issue also effect AttachAction using same method