Search by

eii / filament-editable-text-column

amit-eiitech

An editable text column for Filament tables.

Package info

github.com/amit-eiitech/filament-editable-text-column

pkg:composer/eii/filament-editable-text-column

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-12-03 03:44 UTC

This package is auto-updated.

Last update: 2026-12-03 03:45:09 UTC


README

Filament Editable Text Column by Eii Tech Solutions

Latest Version Total Downloads License PHP 8.3+ Filament 5 GitHub Stars

An editable TextColumn for Filament tables that lets users click a cell (with an inline edit icon) to update its value in a modal. Supports plain text input, selectable options, and ->badge() mode with BackedEnum auto-detection.

Requirements

  • PHP 8.3+
  • Filament 5.0+

Installation

composer require eii/filament-editable-text-column

Usage

Basic Text Column

Without ->options(), clicking the column opens a modal with a TextInput:

use Eii\FilamentEditableTextColumn\Columns\EditableTextColumn;

EditableTextColumn::make('title')

Selectable Options

Pass an array, Arrayable, BackedEnum class, or closure to ->options() to show a Radio selector in the modal:

EditableTextColumn::make('status')
    ->options([
        'draft' => 'Draft',
        'published' => 'Published',
    ])

Badge Mode & Enum Casts

Add ->badge() to display the column and modal options as badges. If the model attribute is cast to a BackedEnum (implementing Filament's HasLabel / HasColor), ->options() is optional:

EditableTextColumn::make('status')
    ->badge()

Or pass the enum class explicitly:

EditableTextColumn::make('status')
    ->options(ContentStatus::class)
    ->badge()

Customization

EditableTextColumn::make('status')
    ->options(ContentStatus::class)
    ->badge()
    ->colors([
        'draft' => 'gray',
        'published' => 'success',
    ])
    ->editable(fn ($record) => ! $record->is_locked)
    ->authorize(true) // uses Gate::allows('update', $record) or pass a Closure
    ->editIcon('heroicon-m-pencil-square')
    ->modalHeading('Change Status')
    ->modalDescription('Select a new status for this record.')
    ->successNotificationTitle('Status updated')
    ->beforeSave(function ($record, $newValue, $oldValue) {
        // runs before saving
    })
    ->afterSave(function ($record, $newValue, $oldValue) {
        // runs after saving
    })

Testing

composer test

License

This package is open-sourced software licensed under the MIT License.

Alt text

Developed and maintained by Amit Haldar

From Eii Tech Solutions

If you find this package useful, consider giving it a ⭐ on GitHub!