mhdrefdi-ptr/filament-freeze-action-table
最新稳定版本:v1.0.0
Composer 安装命令:
composer require mhdrefdi-ptr/filament-freeze-action-table
包简介
A Filament package that keeps table action columns fixed (frozen) during horizontal scrolling, ensuring actions remain visible and easily accessible.
README 文档
README
Keep Filament table action columns sticky on the right during horizontal scrolling.
Supports Filament ^4.0.
Installation
composer require mhdrefdi-ptr/filament-freeze-action-table php artisan filament:assets
Quick Start (Recommended)
Register the plugin in your panel provider:
use Filament\Panel; use Mhdrefdi\FilamentFreezeActionTable\FilamentFreezeActionTablePlugin; public function panel(Panel $panel): Panel { return $panel ->plugin( FilamentFreezeActionTablePlugin::make() ->enabledByDefault(true) ); }
Plugin Configuration
Available fluent methods:
enabledByDefault(bool $condition = true)zIndexBody(int $value)zIndexHeader(int $value)shadowEnabled(bool $condition = true)shadowLight(string $value)shadowDark(string $value)darkHoverMixPercent(int $value)
Example:
->plugin( FilamentFreezeActionTablePlugin::make() ->enabledByDefault(true) ->zIndexBody(15) ->zIndexHeader(16) ->shadowEnabled(true) ->darkHoverMixPercent(5) )
Multi-panel behavior
Table::configureUsing()is guarded per panel ID (no duplicate registrations).- Defaults are applied only when the current panel matches that plugin's panel.
Per-table Override
use Filament\Tables\Table; public static function table(Table $table): Table { return $table ->freezeActionColumn(false); // disable for this table }
Enable explicitly:
return $table->freezeActionColumn(true);
Optional Config File
If you prefer config-file driven setup:
php artisan vendor:publish --tag=filament-freeze-action-table-config
Available keys in config/filament-freeze-action-table.php:
enabled_by_defaultz_index_bodyz_index_headershadow_enabledshadow_lightshadow_darkdark_hover_mix_percent
How It Works
- Frontend behavior is loaded via Filament assets (
FilamentAsset::register), not inline render hooks. - Action column is detected from action triggers in the row.
- Shadow appears only when horizontal overflow exists.
Testing
Browser spec:
tests/browser/freeze-action-column.spec.ts
Run:
npx playwright install chromium
npx playwright test packages/mhdrefdi-ptr/filament-freeze-action-table/tests/browser/freeze-action-column.spec.ts
Optional env URLs:
FFT_TEST_URL(default:http://127.0.0.1:8000/admin/users)FFT_TEST_URL_WIDE(default:http://127.0.0.1:8000/admin/users-wide)
Changelog
See CHANGELOG.md.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-18