Search by

majid-shafik / filament-table-drag-scroll

Majid-Shafik

Grab and drag horizontally scrollable Filament tables with a mouse.

Package info

github.com/Majid-Shafik/filament-table-drag-scroll

Language:JavaScript

pkg:composer/majid-shafik/filament-table-drag-scroll

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v1.0.1 2026-09-11 17:50 UTC

This package is auto-updated.

Last update: 2026-09-11 18:37:49 UTC


README

Latest Version on Packagist Tests Total Downloads

Table Drag Scroll Demo

Grab and drag horizontally scrollable Filament tables with a mouse. The package works with Filament panels and standalone tables, including RTL layouts, Livewire updates, and SPA navigation.

Features

  • Automatically detects horizontally scrollable Filament tables.
  • Uses native Pointer Events and the primary mouse button.
  • Preserves links, buttons, inputs, sorting, and reordering controls.
  • Prevents accidental row clicks after a real drag.
  • Cancels when the gesture is primarily vertical.
  • Requires no JavaScript build step and does not modify Filament vendor files.

Requirements

  • PHP 8.2 or newer.
  • Filament 5.x.

Installation

Install the package through Composer:

composer require majid-shafik/filament-table-drag-scroll

Publish Filament assets, then refresh the browser:

php artisan filament:assets

No panel provider changes are required. The package is enabled automatically through Laravel package discovery.

Configuration

The defaults work for standard Filament tables. To customize them, publish the config file:

php artisan vendor:publish --tag="filament-table-drag-scroll-config"

You may disable the behavior, change the drag threshold, or add selectors that must remain interactive:

return [
    'enabled' => true,
    'drag_threshold' => 6,
    'excluded_selectors' => [
        'a',
        'button',
        'input',
        'select',
        'textarea',
        'label',
        '[contenteditable="true"]',
        '[draggable="true"]',
        '[role="button"]',
        '[x-sortable-handle]',
        '.fi-ta-reorder-handle',
    ],
];

After changing package assets, run php artisan filament:assets again.

Testing

composer test
composer test:lint
composer analyse
node --check resources/js/table-drag-scroll.js

Changelog

See CHANGELOG.md for release history.

Security

Please report security issues privately as described in SECURITY.md.

License

The MIT License. See LICENSE.md.

f i l a m e n t - t a b l e - d r a g - s c r o l l