rabol
rabol
FFilament
Created by rabol on 1/13/2025 in #❓┊help
Strange new error in select component
It must have been something with the relation. I have changed the select to this and now it works:
Forms\Components\Select::make("exchange_info_id")
->searchable()
->getSearchResultsUsing(
fn(string $search): array => ExchangeInfo::where(
"symbol",
"like",
"%{$search}%"
)
->limit(50)
->pluck("symbol", "id")
->toArray()
)
->getOptionLabelUsing(
fn($value): ?string => ExchangeInfo::find($value)?->symbol
),
Forms\Components\Select::make("exchange_info_id")
->searchable()
->getSearchResultsUsing(
fn(string $search): array => ExchangeInfo::where(
"symbol",
"like",
"%{$search}%"
)
->limit(50)
->pluck("symbol", "id")
->toArray()
)
->getOptionLabelUsing(
fn($value): ?string => ExchangeInfo::find($value)?->symbol
),
8 replies
FFilament
Created by rabol on 1/13/2025 in #❓┊help
Strange new error in select component
I get this: URL: https://zynkto.test/livewire/update Input: {"_token":"gxMlQ0qJhfoNNnjR5lTZi80qNTYBCSt0rjpnPtDj","components":[{"snapshot":"{"data":{"record":null,"data":[{"name":null,"exchange_info_id":null},{"s":"arr"}],"previousUrl":"https:\/\/zynkto.test\/dashboard\/user-strategies","mountedActions":[[],{"s":"arr"}],"mountedActionsArguments":[[],{"s":"arr"}],"mountedActionsData":[[],{"s":"arr"}],"defaultAction":null,"defaultActionArguments":null,"componentFileAttachments":[[],{"s":"arr"}],"mountedFormComponentActions":[[],{"s":"arr"}],"mountedFormComponentActionsArguments":[[],{"s":"arr"}],"mountedFormComponentActionsData":[[],{"s":"arr"}],"mountedFormComponentActionsComponents":[[],{"s":"arr"}],"mountedInfolistActions":[[],{"s":"arr"}],"mountedInfolistActionsData":[[],{"s":"arr"}],"mountedInfolistActionsComponent":null,"mountedInfolistActionsInfolist":null,"savedDataHash":null},"memo":{"id":"3ASzJIxp9HA5NuNFC1Pm","name":"app.filament.app.resources.user-strategy-resource.pages.create-user-strategy","path":"dashboard\/user-strategies\/create","method":"GET","children":[],"scripts":[],"assets":[],"errors":[],"locale":"en"},"checksum":"bc803e897ed9360c369b36b14f8bf5fdc79efbeda2c12ac42bb832711db79e1d"}","updates":[],"calls":[{"path":"","method":"getFormSelectSearchResults","params":["data.exchange_info_id","BTC"]}]}]}
8 replies
FFilament
Created by rabol on 1/13/2025 in #❓┊help
Strange new error in select component
But...
8 replies
FFilament
Created by rabol on 1/13/2025 in #❓┊help
Strange new error in select component
I have tried to clear all cache, republish Livewire assets etc.
8 replies
FFilament
Created by rabol on 1/13/2025 in #❓┊help
Strange new error in select component
I have a feature that capture all unhandled exceptions and the stack trace points to the select component
#0 /Users/rabol/code/web/zynkto/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(290): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'foreach() argum...', '/Users/rabol/co...', 1084)
#1 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Components/Select.php(1084): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'foreach() argum...', '/Users/rabol/co...', 1084)
#2 /Users/rabol/code/web/zynkto/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(311): Filament\Forms\Components\Select->Filament\Forms\Components\{closure}(Object(Illuminate\Database\Eloquent\Builder))
#3 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Components/Select.php(1081): Illuminate\Database\Eloquent\Builder->where(Object(Closure))
#4 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Components/Select.php(718): Filament\Forms\Components\Select->applySearchConstraint(Object(Illuminate\Database\Eloquent\Builder), 'BTC')
#5 /Users/rabol/code/web/zynkto/vendor/filament/support/src/Concerns/EvaluatesClosures.php(35): Filament\Forms\Components\Select::Filament\Forms\Components\{closure}(Object(Filament\Forms\Components\Select), 'BTC')
#6 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Components/Select.php(629): Filament\Support\Components\Component->evaluate(Object(Closure), Array)
#7 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Components/Select.php(647): Filament\Forms\Components\Select->getSearchResults('BTC')
#8 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Concerns/SupportsSelectFields.php(85): Filament\Forms\Components\Select->getSearchResultsForJs('BTC')
#9 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Concerns/InteractsWithForms.php(164): Filament\Forms\ComponentContainer->getSelectSearchResults('data.exchange_i..
#0 /Users/rabol/code/web/zynkto/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(290): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'foreach() argum...', '/Users/rabol/co...', 1084)
#1 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Components/Select.php(1084): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'foreach() argum...', '/Users/rabol/co...', 1084)
#2 /Users/rabol/code/web/zynkto/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(311): Filament\Forms\Components\Select->Filament\Forms\Components\{closure}(Object(Illuminate\Database\Eloquent\Builder))
#3 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Components/Select.php(1081): Illuminate\Database\Eloquent\Builder->where(Object(Closure))
#4 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Components/Select.php(718): Filament\Forms\Components\Select->applySearchConstraint(Object(Illuminate\Database\Eloquent\Builder), 'BTC')
#5 /Users/rabol/code/web/zynkto/vendor/filament/support/src/Concerns/EvaluatesClosures.php(35): Filament\Forms\Components\Select::Filament\Forms\Components\{closure}(Object(Filament\Forms\Components\Select), 'BTC')
#6 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Components/Select.php(629): Filament\Support\Components\Component->evaluate(Object(Closure), Array)
#7 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Components/Select.php(647): Filament\Forms\Components\Select->getSearchResults('BTC')
#8 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Concerns/SupportsSelectFields.php(85): Filament\Forms\Components\Select->getSearchResultsForJs('BTC')
#9 /Users/rabol/code/web/zynkto/vendor/filament/forms/src/Concerns/InteractsWithForms.php(164): Filament\Forms\ComponentContainer->getSelectSearchResults('data.exchange_i..
8 replies
FFilament
Created by rabol on 10/2/2024 in #❓┊help
How can I avoid pest tests failing if I install frontend panel with the id dashboard
It's not just Jetstream, you will have the same with breeze
7 replies
FFilament
Created by rabol on 10/2/2024 in #❓┊help
How can I avoid pest tests failing if I install frontend panel with the id dashboard
The test are failg because there is no route named 'dashboard' when using filament
7 replies
FFilament
Created by rabol on 9/15/2024 in #❓┊help
Filament::getPanel('dashboard')->getUrl() returns the wrong url
if I add ->default() to the dashboard panel it seems to work - but I cannot have 2 default panels...
4 replies
FFilament
Created by rabol on 9/15/2024 in #❓┊help
Filament::getPanel('dashboard')->getUrl() returns the wrong url
Funny thing: if I remove ->default from the AdminPanel, then I get this error in the navigation-menu.blade.php
Cannot assign null to property Filament\Navigation\NavigationManager::$panel of type Filament\Panel
Cannot assign null to property Filament\Navigation\NavigationManager::$panel of type Filament\Panel
4 replies