定制 shreejan/actionable-column 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shreejan/actionable-column

最新稳定版本:v1.0.0

Composer 安装命令:

composer require shreejan/actionable-column

包简介

Interactive table column with clickable actions for Filament v4

README 文档

README

The Actionable Column plugin allows you to add interactive action buttons to Filament table columns. Display text or badges with seamlessly connected action buttons using Filament's native Action system.

Features

  • Badge mode with connected action button
  • Simple text mode with side-by-side action button
  • Customizable action icons and colors
  • Entire column clickable option
  • Empty state "+ Add" button
  • Support for any Filament Action type (edit, delete, approve, etc.)
  • Independent icon and badge/text colors
  • Seamless integration with Filament tables

Installation

You can install the package via composer:

composer require shreejan/actionable-column

Usage

use Shreejan\ActionableColumn\Tables\Columns\ActionableColumn;
use Filament\Actions\Action;
use Filament\Forms\Components\Select;
use Filament\Support\Icons\Heroicon;

ActionableColumn::make('status')
    ->badge()                                    // Display as badge (or remove for simple text)
    ->color('success')                           // Badge/text color: success, danger, warning, info, primary
    ->actionIcon(Heroicon::PencilSquare)         // Action button icon (Heroicon enum or string)
    ->actionIconColor('warning')                 // Icon color (independent from badge color)
    ->clickableColumn()                          // Make entire column clickable (or remove for button-only)
    ->tapAction(
        Action::make('changeStatus')              // Any Filament Action: edit, delete, approve, etc.
            ->label('Change Status')
            ->tooltip('Click to change status')
            ->schema([
                Select::make('status')
                    ->options([
                        'pending' => 'Pending',
                        'approved' => 'Approved',
                        'rejected' => 'Rejected',
                    ])
                    ->required(),
            ])
            ->fillForm(fn ($record) => [
                'status' => $record->status,
            ])
            ->action(function ($record, array $data) {
                $record->update($data);
            })
    )

Configuration Options

Method Description Default
tapAction(Action|Closure) Set any Filament Action (edit, delete, approve, etc.) -
badge() Display as badge (connected to action button) Simple text mode
color(string) Set badge/text color: success, danger, warning, info, primary -
actionIcon(Heroicon|string) Set action button icon heroicon-o-pencil-square
actionIconColor(string) Set icon color (independent from badge color) -
actionIconSize(IconSize|string) Set icon size: xs, sm, md, lg, xl, 2xl sm
actionLabel(string) Custom "+ Add" button label for empty state "Add"
clickableColumn() Make entire column clickable (not just button) Button only
showActionIcon(bool) Show/hide action button (empty state button always shows) true

All standard TextColumn methods are available: searchable(), sortable(), limit(), date(), formatStateUsing(), etc.

Credits

Security

If you discover a security vulnerability within this package, please send an e-mail to shreezanpandit@gmail.com. All security vulnerabilities will be promptly addressed.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

???? License

The MIT License (MIT). Please see License File for more information.

Made with ❤️ by Shreejan

统计信息

  • 总下载量: 480
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 0
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固