ebrahimimami
ebrahimimami
FFilament
Created by ebrahimimami on 8/24/2024 in #❓┊help
using global search and using modal forms together
If I need the create, view and edit pages of a resource to be displayed as modals, the common solution is to remove them from the returned array of getPages() method. But if I have the global search enabled on that same resource, the global search would caused a kind of route not found exception. Any other way of making create, view and edit pages modal, and also keep their page routes?
2 replies
FFilament
Created by ebrahimimami on 8/24/2024 in #❓┊help
allowing html in option labels of `select` component
I used the exact code in Filament's documentation
use Filament\Forms\Components\Select;

Select::make('technology')
->options([
'tailwind' => '<span class="text-blue-500">Tailwind</span>',
'alpine' => '<span class="text-green-500">Alpine</span>',
'laravel' => '<span class="text-red-500">Laravel</span>',
'livewire' => '<span class="text-pink-500">Livewire</span>',
])
->searchable()
->allowHtml()
use Filament\Forms\Components\Select;

Select::make('technology')
->options([
'tailwind' => '<span class="text-blue-500">Tailwind</span>',
'alpine' => '<span class="text-green-500">Alpine</span>',
'laravel' => '<span class="text-red-500">Laravel</span>',
'livewire' => '<span class="text-pink-500">Livewire</span>',
])
->searchable()
->allowHtml()
not only in my own project, but also I've tried it in Filament's demo project, but none of the color related classes such as text-* or bg-* are working. this issue is while classes like italic , font-bold, line-through are successfully applied.
use Filament\Forms\Components\Select;

Select::make('technology')
->options([
'tailwind' => '<span class="italic">Tailwind</span>',
'alpine' => '<span class="text-bold">Alpine</span>',
'laravel' => '<span class="line-through">Laravel</span>',
'livewire' => '<span class="underline">Livewire</span>',
])
->searchable()
->allowHtml()
use Filament\Forms\Components\Select;

Select::make('technology')
->options([
'tailwind' => '<span class="italic">Tailwind</span>',
'alpine' => '<span class="text-bold">Alpine</span>',
'laravel' => '<span class="line-through">Laravel</span>',
'livewire' => '<span class="underline">Livewire</span>',
])
->searchable()
->allowHtml()
Is it due to something I missed when configuring the project?
4 replies