MAF
MAF
FFilament
Created by Wessire on 8/12/2023 in #❓┊help
How to include Vite compiled JS into admin panel?
Thank you! for sharing the solution.
8 replies
FFilament
Created by MAF on 5/22/2024 in #❓┊help
Calling $wire.$id inside custom form element returns the whole form ID and not only the element.
Thank you @Dennis Koch and sorry for the misunderstanding
5 replies
FFilament
Created by sidrit on 4/3/2024 in #❓┊help
ReferenceError: selectedRows is not defined
What I have noticed is all those functions are in table.js file, and the file is loaded successfully in the network log.
8 replies
FFilament
Created by sidrit on 4/3/2024 in #❓┊help
ReferenceError: selectedRows is not defined
8 replies
FFilament
Created by sidrit on 4/3/2024 in #❓┊help
ReferenceError: selectedRows is not defined
A few more errors
8 replies
FFilament
Created by sidrit on 4/3/2024 in #❓┊help
ReferenceError: selectedRows is not defined
8 replies
FFilament
Created by sidrit on 4/3/2024 in #❓┊help
ReferenceError: selectedRows is not defined
When I added bulk actions, I am getting more errors too
8 replies
FFilament
Created by sidrit on 4/3/2024 in #❓┊help
ReferenceError: selectedRows is not defined
I have exactly the same problem. Did you find a solution?
8 replies
FFilament
Created by MAF on 5/15/2024 in #❓┊help
I have to submit the form twice to update the table in a custom page with a table and a from
So, I replaced $this->getTableQuery() with $this->dispatch('updateClientsTable'); in findClient() and it worked perfectly. Ah, I also added protected $listeners = ['updateClientsTable' => '$refresh']; in the class.
4 replies
FFilament
Created by MAF on 5/15/2024 in #❓┊help
I have to submit the form twice to update the table in a custom page with a table and a from
Here is the livewire blade:
<x-filament-panels::page>
<div class="fi-simple-page">
<section class="rounded-xl bg-white shadow-sm ring-1 fi-section ring-gray-950/5">

<x-filament-panels::form wire:submit="findClient">
{{ $this->findClientForm }}

<x-filament-panels::form.actions
:actions="$this->getFindClientFormActions()"
:full-width="false"
/>
</x-filament-panels::form>

{{ $this->table }}

</section>
</div>

</x-filament-panels::page>
<x-filament-panels::page>
<div class="fi-simple-page">
<section class="rounded-xl bg-white shadow-sm ring-1 fi-section ring-gray-950/5">

<x-filament-panels::form wire:submit="findClient">
{{ $this->findClientForm }}

<x-filament-panels::form.actions
:actions="$this->getFindClientFormActions()"
:full-width="false"
/>
</x-filament-panels::form>

{{ $this->table }}

</section>
</div>

</x-filament-panels::page>
4 replies
FFilament
Created by MAF on 5/15/2024 in #❓┊help
I have to submit the form twice to update the table in a custom page with a table and a from
Here is the custom page code:
class CreateBooking extends Page implements HasTable
{
use InteractsWithTable;

protected static string $resource = BookingResource::class;

protected static string $view = 'filament.partner.resources.booking-resource.pages.new-booking';

public ?array $clientData = [];

public function findClientForm(Form $form): Form
{
return $form->schema([
TextInput::make('name')
->required()

])
->statePath('clientData');
}

protected function getForms(): array
{
return [
'findClientForm',
];
}

protected function getFindClientFormActions(): array
{
return [
Action::make('findClient')
->submit('findClient'),
];
}

public function table(Table $table): Table
{
return $table
->query($this->getTableQuery())
->columns([
TextColumn::make('name'),
])
->actions([
Action::make('select')
->label('Edit User')
->action(fn (User $user) => $this->findClient($user->id)),
]);
}

protected function getTableQuery()
{
if (isset($this->clientData['name'])) {
return User::query()
->where('name', 'like', '%'.$this->clientData['name'].'%');
} else {
return User::query()->where('id', null);
}
}

public function findClient()
{
// ray('findClient');
$this->getTableQuery();
}
}
class CreateBooking extends Page implements HasTable
{
use InteractsWithTable;

protected static string $resource = BookingResource::class;

protected static string $view = 'filament.partner.resources.booking-resource.pages.new-booking';

public ?array $clientData = [];

public function findClientForm(Form $form): Form
{
return $form->schema([
TextInput::make('name')
->required()

])
->statePath('clientData');
}

protected function getForms(): array
{
return [
'findClientForm',
];
}

protected function getFindClientFormActions(): array
{
return [
Action::make('findClient')
->submit('findClient'),
];
}

public function table(Table $table): Table
{
return $table
->query($this->getTableQuery())
->columns([
TextColumn::make('name'),
])
->actions([
Action::make('select')
->label('Edit User')
->action(fn (User $user) => $this->findClient($user->id)),
]);
}

protected function getTableQuery()
{
if (isset($this->clientData['name'])) {
return User::query()
->where('name', 'like', '%'.$this->clientData['name'].'%');
} else {
return User::query()->where('id', null);
}
}

public function findClient()
{
// ray('findClient');
$this->getTableQuery();
}
}
4 replies
FFilament
Created by Lorey on 8/14/2023 in #❓┊help
Is it possible to disable a resource index without changing authorization?
I found this hack, but I am not sure if there is a better way or not https://discord.com/channels/883083792112300104/1151970322640273469
5 replies
FFilament
Created by Lorey on 8/14/2023 in #❓┊help
Is it possible to disable a resource index without changing authorization?
Yes, I have the same question 🙂
5 replies
FFilament
Created by Damien on 2/8/2024 in #❓┊help
Why does my form `->required()` methods not work inside of a Livewire component?
@Dennis Koch never mind, I found a lot of mistakes in my code. Thank you
25 replies
FFilament
Created by Damien on 2/8/2024 in #❓┊help
Why does my form `->required()` methods not work inside of a Livewire component?
25 replies
FFilament
Created by Damien on 2/8/2024 in #❓┊help
Why does my form `->required()` methods not work inside of a Livewire component?
Sorry, I think there is a misunderstanding here. I said, calling this->form->getState() in submit function.
25 replies
FFilament
Created by Damien on 2/8/2024 in #❓┊help
Why does my form `->required()` methods not work inside of a Livewire component?
I moved the logic to boot() instead of mount() and everything worked perfectly!
25 replies
FFilament
Created by Damien on 2/8/2024 in #❓┊help
Why does my form `->required()` methods not work inside of a Livewire component?
I have the same issue, but for some weird reason! calling $this->form->getState(); in the submit function returns an empty array, and $this->form; returns an empty form instance, however $this-data returns the data correctly;
25 replies
FFilament
Created by MAF on 12/29/2023 in #❓┊help
Is there a way to use Heroicons inside HtmlString?
For now, I used
return new HtmlString(
Blade::render(
"<a href=\"link\">my label-<x-filament::icon icon=\"heroicon-o-check-badge\" /></a>"
)
);
return new HtmlString(
Blade::render(
"<a href=\"link\">my label-<x-filament::icon icon=\"heroicon-o-check-badge\" /></a>"
)
);
2 replies
FFilament
Created by MAF on 10/24/2023 in #❓┊help
How can I work around this `column reference "id" is ambiguous`?
whereHas worked perfectly, thank you, again
5 replies