SH0_T
SH0_T
FFilament
Created by SH0_T on 2/25/2025 in #❓┊help
Toggleable colomn fails after making it visible again
No description
14 replies
FFilament
Created by SH0_T on 2/25/2025 in #❓┊help
Toggleable colomn fails after making it visible again
No description
14 replies
FFilament
Created by SH0_T on 2/25/2025 in #❓┊help
Toggleable colomn fails after making it visible again
No description
14 replies
FFilament
Created by SH0_T on 2/25/2025 in #❓┊help
Toggleable colomn fails after making it visible again
No description
14 replies
FFilament
Created by SH0_T on 2/25/2025 in #❓┊help
Toggleable colomn fails after making it visible again
No description
14 replies
FFilament
Created by SH0_T on 2/25/2025 in #❓┊help
Toggleable colomn fails after making it visible again
Only the first screenshot is right, (the state it is when i load the page for the first time, i can make more clear screenshots tomorrow
14 replies
FFilament
Created by SH0_T on 2/25/2025 in #❓┊help
Toggleable colomn fails after making it visible again
Does someone know how to fix this issue?
14 replies
FFilament
Created by SH0_T on 2/25/2025 in #❓┊help
Toggleable colomn fails after making it visible again
<?php

namespace App\Filament\Resources\ApplicationResource\Pages;

use App\Filament\Resources\ApplicationResource;
use Filament\Actions\Action;
use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ListRecords;

class ListApplications extends ListRecords
{
protected static string $resource = ApplicationResource::class;

public bool $isEditMode = false;

protected function getHeaderActions(): array
{
return [
Action::make('toggleEdit')
->label(fn() => $this->isEditMode ? 'To Display Mode' : 'To Edit Mode')
->action('toggleEditMode')
->color('secondary'),
CreateAction::make(),
];
}

public function toggleEditMode(): void
{
$this->isEditMode = !$this->isEditMode;
}
}
<?php

namespace App\Filament\Resources\ApplicationResource\Pages;

use App\Filament\Resources\ApplicationResource;
use Filament\Actions\Action;
use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ListRecords;

class ListApplications extends ListRecords
{
protected static string $resource = ApplicationResource::class;

public bool $isEditMode = false;

protected function getHeaderActions(): array
{
return [
Action::make('toggleEdit')
->label(fn() => $this->isEditMode ? 'To Display Mode' : 'To Edit Mode')
->action('toggleEditMode')
->color('secondary'),
CreateAction::make(),
];
}

public function toggleEditMode(): void
{
$this->isEditMode = !$this->isEditMode;
}
}
14 replies
FFilament
Created by SH0_T on 2/25/2025 in #❓┊help
Toggleable colomn fails after making it visible again
First load it is correct, but after switching it messes it up and will always be one "state" behind 1st screenshot is initial state 2nd screenshot is edit mode with display mode toggelables 3th screenshot is display mode again with edit mode toggelables
14 replies
FFilament
Created by SH0_T on 2/25/2025 in #❓┊help
Toggleable colomn fails after making it visible again
No description
14 replies
FFilament
Created by SH0_T on 2/12/2025 in #❓┊help
TextColumn and TextInputColumn for the same property
I think so, Will try it in a few hours again
11 replies
FFilament
Created by SH0_T on 2/12/2025 in #❓┊help
TextColumn and TextInputColumn for the same property
Is mark solution broken? right click -> mark solution -> Error: The appliciation did not respond.
11 replies
FFilament
Created by SH0_T on 2/12/2025 in #❓┊help
TextColumn and TextInputColumn for the same property
Thank you very much! I completely overlooked this in the docs.
11 replies
FFilament
Created by SH0_T on 2/12/2025 in #❓┊help
TextColumn and TextInputColumn for the same property
class ListApplications extends ListRecords
{
protected static string $resource = ApplicationResource::class;

public bool $isEditMode = false;

protected function getHeaderActions(): array
{
return [
Action::make('toggleEdit')
->label(fn() => $this->isEditMode ? 'To Display Mode' : 'To Edit Mode')
->action('toggleEditMode'),
CreateAction::make(),
];
}

public function toggleEditMode(): void
{
$this->isEditMode = !$this->isEditMode;
}
}
class ListApplications extends ListRecords
{
protected static string $resource = ApplicationResource::class;

public bool $isEditMode = false;

protected function getHeaderActions(): array
{
return [
Action::make('toggleEdit')
->label(fn() => $this->isEditMode ? 'To Display Mode' : 'To Edit Mode')
->action('toggleEditMode'),
CreateAction::make(),
];
}

public function toggleEditMode(): void
{
$this->isEditMode = !$this->isEditMode;
}
}
11 replies
FFilament
Created by SH0_T on 2/12/2025 in #❓┊help
TextColumn and TextInputColumn for the same property
I forgot the code example:
public static function form(Form $form): Form
public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('name')
->label('Name')
->searchable()
->sortable()
->hidden(fn($livewire) => $livewire->isEditMode),
TextInputColumn::make('name')
->label('Name')
->placeholder('Enter the name of the application')
->rules(['required', 'max:255', 'unique:applications,name'])
->hidden(fn($livewire) => !$livewire->isEditMode),
TextColumn::make('created_at')
->label('Created At')
->sortable()
->hidden(fn($livewire) => $livewire->isEditMode),
TextColumn::make('updated_at')
->label('Updated At')
->sortable()
->hidden(fn($livewire) => $livewire->isEditMode),
])
->defaultSort('name')
->persistSortInSession()
->filters([

])
->actions([
EditAction::make()
->hidden(fn($livewire) => $livewire->isEditMode),
DeleteAction::make()
->hidden(fn($livewire) => !$livewire->isEditMode),
])
->bulkActions([
BulkActionGroup::make([
DeleteBulkAction::make(),
]),
]);
}
public static function form(Form $form): Form
public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('name')
->label('Name')
->searchable()
->sortable()
->hidden(fn($livewire) => $livewire->isEditMode),
TextInputColumn::make('name')
->label('Name')
->placeholder('Enter the name of the application')
->rules(['required', 'max:255', 'unique:applications,name'])
->hidden(fn($livewire) => !$livewire->isEditMode),
TextColumn::make('created_at')
->label('Created At')
->sortable()
->hidden(fn($livewire) => $livewire->isEditMode),
TextColumn::make('updated_at')
->label('Updated At')
->sortable()
->hidden(fn($livewire) => $livewire->isEditMode),
])
->defaultSort('name')
->persistSortInSession()
->filters([

])
->actions([
EditAction::make()
->hidden(fn($livewire) => $livewire->isEditMode),
DeleteAction::make()
->hidden(fn($livewire) => !$livewire->isEditMode),
])
->bulkActions([
BulkActionGroup::make([
DeleteBulkAction::make(),
]),
]);
}
11 replies
FFilament
Created by SH0_T on 2/12/2025 in #❓┊help
TextColumn and TextInputColumn for the same property
No description
11 replies