builder bug

i have a builder set up and its working perfectly, however there is a "insert" button that shouldnt exist between my items and it actually works (again, it shouldnt). Can anyone help please?
No description
No description
7 Replies
LeandroFerreira
LeandroFerreira4mo ago
please read #✅┊rules before posting..
fernando
fernandoOP4mo ago
sorry, here's my code:
protected function getTemplateTextoListaNumeros(): Component
{
return Builder::make(self::ListaNumeros->getLabel())
->hiddenLabel()
->blocks([
Block::make('Item')
->schema([
RichEditor::make('texto')
->toolbarButtons([
'bold',
'underline',
'italic',
'strike',
'redo',
'undo',
'link',
])
->label('Texto')
->required(),
])
])
->collapsed();
}
protected function getTemplateTextoListaNumeros(): Component
{
return Builder::make(self::ListaNumeros->getLabel())
->hiddenLabel()
->blocks([
Block::make('Item')
->schema([
RichEditor::make('texto')
->toolbarButtons([
'bold',
'underline',
'italic',
'strike',
'redo',
'undo',
'link',
])
->label('Texto')
->required(),
])
])
->collapsed();
}
awcodes
awcodes4mo ago
use Filament\Forms\Components\Actions\Action;

->addBetweenAction(fn (Action $action) => $action->hidden())
use Filament\Forms\Components\Actions\Action;

->addBetweenAction(fn (Action $action) => $action->hidden())
fernando
fernandoOP4mo ago
thanks it worked!! just one more thing, i used the builder multiple times in my code, do i have to add this function in all of them or can i do something to change it for good?
awcodes
awcodes4mo ago
https://filamentphp.com/docs/3.x/forms/fields/getting-started#global-settings in a service provider:
Builder::configureUsing(function (Builder $component): void {
$component->addBetweenAction(fn (Action $action) => $action->hidden());
});
Builder::configureUsing(function (Builder $component): void {
$component->addBetweenAction(fn (Action $action) => $action->hidden());
});
fernando
fernandoOP4mo ago
tysm man helped me a lot!
awcodes
awcodes4mo ago
No worries. Please mark this as resolved.
Want results from more Discord servers?
Add your server