xentixar/dynamic-table
Composer 安装命令:
composer require xentixar/dynamic-table
包简介
README 文档
README
xentixar/dynamic-table is a Filament package that adds dynamic table behavior.
Features
- Adds
Table::liveSelection()macro for reactive selection syncing. - Supports optional Livewire callback method execution on selection changes.
- Registers on both Filament Tables and Archilex Advanced Tables (if installed).
Requirements
- PHP 8.2+
- Filament Tables
^4.0 || ^5.0 - Illuminate Support
^11.0 || ^12.0 || ^13.0
Installation
Install with Composer:
composer require xentixar/dynamic-table
The package uses Laravel package discovery, so the service provider is auto-registered.
Quick Start
Apply liveSelection() on your table definition:
use Filament\Tables\Table; public static function table(Table $table): Table { return $table ->liveSelection(); }
Usage
1) Basic usage
public static function table(Table $table): Table { return $table->liveSelection(); }
2) Conditional enable/disable
public static function table(Table $table): Table { return $table->liveSelection( condition: auth()->user()?->can('bulkSelectUsers') ?? false, ); }
3) Use custom Livewire property
public static function table(Table $table): Table { return $table->liveSelection( livewireProperty: 'selectedUsers', ); }
4) Trigger a Livewire method on selection change
public static function table(Table $table): Table { return $table->liveSelection( livewireMethod: 'onSelectionChanged', ); } public function onSelectionChanged( array $selectedRecords, array $deselectedRecords, bool $isTrackingDeselectedRecords, ): void { // Your logic here }
If livewireMethod is not provided, the component refreshes automatically.
API Reference
condition(bool, default:true)- Enable or disable live selection behavior.
livewireProperty(string, default:selectedTableRecords)- Livewire property used for current selection state.
livewireMethod(?string, default:null)- Optional Livewire method called when selection changes.
- Receives
(array $selectedRecords, array $deselectedRecords, bool $isTrackingDeselectedRecords).
Troubleshooting
Method liveSelection does not exist:- Run
composer dump-autoloadand clear app caches (php artisan optimize:clear).
- Run
- Callback not firing:
- Ensure the method name in
livewireMethodmatches exactly and ispublic.
- Ensure the method name in
- Selection state not where expected:
- Verify the
livewirePropertyname matches your component property.
- Verify the
License
MIT
See LICENSE for full text.
xentixar/dynamic-table 适用场景与选型建议
xentixar/dynamic-table 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 xentixar/dynamic-table 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 xentixar/dynamic-table 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 34
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-11