gizmojo
gizmojo
FFilament
Created by phydeaux on 8/6/2024 in #❓┊help
Does configureUsing work on Filament\Panel?
Cheers guys just came here attempting the same thing
8 replies
FFilament
Created by 🎮Days🕹 on 4/12/2024 in #❓┊help
Testing action error
Same issue here when halting the action and testing for this. @Dennis Koch those assertions prevent it reaching assertActionHalted.
7 replies
FFilament
Created by gizmojo on 6/9/2024 in #❓┊help
How do we overwrite all resource pages?
bump
6 replies
FFilament
Created by gizmojo on 6/9/2024 in #❓┊help
How do we overwrite all resource pages?
6 replies
FFilament
Created by Milorn on 1/2/2024 in #❓┊help
Refresh tab badge
Cheers that worked on the EditResource's relation manager too 👍
#[On('refreshRelationManagers')]
public function getRelationManagers(): array
{
return parent::getRelationManagers();
}
#[On('refreshRelationManagers')]
public function getRelationManagers(): array
{
return parent::getRelationManagers();
}
6 replies
FFilament
Created by Milorn on 1/2/2024 in #❓┊help
Refresh tab badge
Did you find a solutions for this?
6 replies
FFilament
Created by gizmojo on 1/24/2024 in #❓┊help
How to hook into 'create another' action
Yeah kinda using afterStateHydrated/Set on a component within the form (credit to @oddvalue for coming up with this work around)
public function form(Form $form): Form
{
return $form
->schema([
Grid::make()
// Instead of filing the form so that it works with 'create another'
->afterStateHydrated(function (TicketsRelationManager $livewire, Set $set, ?Model $record): void {
if ($record?->id) {
return;
}

$data = self::getDefaultFormData($livewire);

foreach ($data as $key => $value) {
$set($key, $value);
}
})
public function form(Form $form): Form
{
return $form
->schema([
Grid::make()
// Instead of filing the form so that it works with 'create another'
->afterStateHydrated(function (TicketsRelationManager $livewire, Set $set, ?Model $record): void {
if ($record?->id) {
return;
}

$data = self::getDefaultFormData($livewire);

foreach ($data as $key => $value) {
$set($key, $value);
}
})
6 replies
FFilament
Created by TiBiBa on 5/26/2023 in #❓┊help
How to dynamically set getRelations()?
Hats off to you Dan! I've lost count of the number of times you've already planned the feature I end up needing.
5 replies
FFilament
Created by gizmojo on 1/27/2024 in #❓┊help
Update field state from alpine
Cheers yeah that work
->extraAlpineAttributes(fn (Forms\Components\TextInput $component): array => [
'x-on:keyup' => <<<JS
\$event.target.value = \$event.target.value.toLowerCase();
\$wire.\$set('{$component->getStatePath(true)}', \$event.target.value)
JS
])
->extraAlpineAttributes(fn (Forms\Components\TextInput $component): array => [
'x-on:keyup' => <<<JS
\$event.target.value = \$event.target.value.toLowerCase();
\$wire.\$set('{$component->getStatePath(true)}', \$event.target.value)
JS
])
5 replies
FFilament
Created by gizmojo on 1/24/2024 in #❓┊help
How to hook into 'create another' action
No description
6 replies
FFilament
Created by gizmojo on 12/30/2023 in #❓┊help
Test form component's action
Cheers @Leandro Ferreira that's exactly what I needed. Any ideas how to test the replicate action was successfully called and redirects?
5 replies
FFilament
Created by gizmojo on 12/23/2023 in #❓┊help
Testing table set activeTab and toggle all columns
Cheers I found it was actually possible to set the property and the hook event for updatedActiveTab is called very easy/cool:
livewire(ListProducts::class)
->assertCountTableRecords(4)
->set('activeTab', 2)
->assertCountTableRecords(2)
livewire(ListProducts::class)
->assertCountTableRecords(4)
->set('activeTab', 2)
->assertCountTableRecords(2)
5 replies
FFilament
Created by gizmojo on 12/28/2023 in #❓┊help
Fieldset with single column
Oh just needed to use lg instead of default
Fieldset::make()
->columnSpan(1)
->columns(['lg' => 1])
Fieldset::make()
->columnSpan(1)
->columns(['lg' => 1])
12 replies
FFilament
Created by gizmojo on 12/28/2023 in #❓┊help
Fieldset with single column
That's to overwrite the full colspan 🙂
<?php

namespace Filament\Forms\Components;

use Closure;
use Filament\Forms\Components\Contracts\CanEntangleWithSingularRelationships;
use Illuminate\Contracts\Support\Htmlable;

class Fieldset extends Component implements CanEntangleWithSingularRelationships
{
use Concerns\EntanglesStateWithSingularRelationship;

/**
* @var view-string
*/
protected string $view = 'filament-forms::components.fieldset';

final public function __construct(string | Htmlable | Closure | null $label = null)
{
$this->label($label);
}

public static function make(string | Htmlable | Closure | null $label = null): static
{
$static = app(static::class, ['label' => $label]);
$static->configure();

return $static;
}

protected function setUp(): void
{
parent::setUp();

$this->columnSpan('full');

$this->columns(2);
}
}
<?php

namespace Filament\Forms\Components;

use Closure;
use Filament\Forms\Components\Contracts\CanEntangleWithSingularRelationships;
use Illuminate\Contracts\Support\Htmlable;

class Fieldset extends Component implements CanEntangleWithSingularRelationships
{
use Concerns\EntanglesStateWithSingularRelationship;

/**
* @var view-string
*/
protected string $view = 'filament-forms::components.fieldset';

final public function __construct(string | Htmlable | Closure | null $label = null)
{
$this->label($label);
}

public static function make(string | Htmlable | Closure | null $label = null): static
{
$static = app(static::class, ['label' => $label]);
$static->configure();

return $static;
}

protected function setUp(): void
{
parent::setUp();

$this->columnSpan('full');

$this->columns(2);
}
}
12 replies
FFilament
Created by gizmojo on 12/28/2023 in #❓┊help
Fieldset with single column
Yeah that works on everything else apart from a fieldset.
12 replies
FFilament
Created by gizmojo on 12/23/2023 in #❓┊help
Testing table set activeTab and toggle all columns
Bump - primarily in need of a way of testing the activeTab which is set on the resource. So can't find a way of setting this?
5 replies
FFilament
Created by gizmojo on 12/28/2023 in #❓┊help
Fieldset with single column
Yes there doesn't appear to be a way of overwriting a fieldset to have only one column
12 replies
FFilament
Created by gizmojo on 12/11/2023 in #❓┊help
Syntax error with text-input-column.blade.php
Cheers yeah see now it was only added recently.
4 replies
FFilament
Created by Jyrki on 4/17/2023 in #❓┊help
Testing TextInputColumn
Awesome cheers
8 replies
FFilament
Created by Jyrki on 4/17/2023 in #❓┊help
Testing TextInputColumn
Just come looking for the same. Did you find a way of testing this @Jyrki
8 replies