Issue:
When attempting to use the OEmbed component to enter a YouTube URL, the following error is thrown:
FilamentAddons\Forms\Components\OEmbed::FilamentAddons\Forms\Components\{closure}(): Argument #1 ($set) must be of type Closure, Filament\Forms\Set given, called in /home/abbasmashaddy72/Documents/Sites/Dynamic/cms/vendor/filament/support/src/Concerns/EvaluatesClosures.php on line 35
Resolution:
To resolve this issue, I made the following changes to the code:
Old Code (Line No: 30):
->afterStateUpdated(function(Closure $set, Closure $get, $state) use ($field) {
Updated Code:
->afterStateUpdated(function (Set $set, Get $get, $state) use ($field) {
After making this change, the issue was resolved, and the OEmbed component worked as expected.
Thanks to the FilamentAddons package for its valuable contributions in enhancing Filament's admin panel functionality! 👏🎉
I am adding a Pull Request for the Same, I would appreciate it if accepted.
Bug Fix: OEmbed Component Throws Error
Issue: When attempting to use the OEmbed component to enter a YouTube URL, the following error is thrown:
Resolution: To resolve this issue, I made the following changes to the code:
Old Code (Line No: 30):
Updated Code:
After making this change, the issue was resolved, and the OEmbed component worked as expected.
Thanks to the FilamentAddons package for its valuable contributions in enhancing Filament's admin panel functionality! 👏🎉
I am adding a Pull Request for the Same, I would appreciate it if accepted.