Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Clickable Table Row Laravel Package

digital-creative/clickable-table-row

Make any Filament table row clickable with digital-creative/clickable-table-row. Add the trait to your resource, point rows at a URL or action, and users can click anywhere in a row to navigate—lightweight, configurable, and easy to drop into existing tables.

View on GitHub
Deep Wiki
Context7

Getting Started

Install it like any other Nova tool:

composer require digital-creative/clickable-table-row

The package ships a service provider that is auto-discovered by Laravel; it registers a small JavaScript asset through Nova (Nova::script(...) from its boot() method). There is no migration, no panel, and no database touch. If auto-discovery is disabled in your app, add DigitalCreative\ClickableTableRow\ClickableTableRowServiceProvider (check src/ for the exact class name) to config/app.php.

After installing, clear Nova's compiled assets so the new script is served:

php artisan nova:publish
php artisan optimize:clear

Then hard-refresh the browser. Your first use case is immediate: open any resource index (e.g. /nova/resources/users), click anywhere on a row that is not a link, button, or checkbox, and Nova should navigate to that resource's detail page. If the package exposes per-resource opt-in (a trait or a ClickableRow::make() field), the README is the source of truth for that version — read it before wiring it into a large app.

Where to look first when something is off:

  • src/*ServiceProvider.php — confirms how the asset is registered and whether there is a config gate.
  • resources/js/ or dist/js/ — the actual click listener; this is where row selectors and ignored elements live.
  • config/clickable-table-row.php — only exists after php artisan vendor:publish --tag=clickable-table-row (tag name may differ); publish only if you need to change behavior.

Implementation Patterns

Global default. The intended pattern is "install once, every index table becomes clickable." That is fine for small admin panels; for larger apps, treat the behavior as a global UX decision rather than a per-resource feature.

Opting resources in or out. If the version you install supports a config list or a resource trait, prefer opt-in over opt-out on anything with destructive inline actions. Where no config exists, you can still gate it yourself: register the script conditionally from your own NovaServiceProvider::boot() based on request()->route()->parameters() or an env flag, and skip the package's provider registration in config/app.php for environments where you don't want it.

Coexisting with inline actions. Nova resource rows often contain buttons (edit, delete, run action), links (belongsTo fields, Link fields), and selection checkboxes. A good row-click implementation delegates on the table and bails when the event target is inside a, button, input, [dusk="...-checkbox"], or an actions dropdown. Verify every resource you enable — a delete button that also navigates is the most common regression.

Pairing with indexQuery and ordering. Row clicks land on the detail page, so the row must actually contain a link or a resource ID the JS can read. If you override indexQuery heavily or use custom fields() that don't include an ID or title link, test that the derived URL still resolves. title()/subtitle() changes are safe; removing the primary field link is not.

Authorization. The package does not bypass Nova policies — it derives the destination URL from the row. If a user can see a row but not view the resource, clicking will hit a 403/404. Confirm viewAny and view policies align, or hide rows you don't want clickable.

Testing. Since the feature is JavaScript-only, PHPUnit feature tests won't cover it. Use Laravel Dusk (or Playwright against a seeded Nova install) with a test like "click row, assert URL changed to /nova/resources/users/{id}" and a second test asserting a click on an inline button does not navigate.

Gotchas and Tips

  • Archived and unmaintained. Last release was August 2021, aimed at Nova 3/4-era markup. Nova has changed table rendering since; the selector the listener relies on (tr, [dusk], .table-row, etc.) may no longer match. Smoke-test on your Nova version before rolling out — this is the single biggest risk.
  • Nova asset caching. After composer require, if nothing changes, run php artisan nova:publish and a hard refresh. Nova caches its compiled JS; a stale /nova-api asset is the usual "it installed but does nothing" cause.
  • Checkbox and shift-click. Multi-select rows are a common bug: clicking the checkbox should select, not navigate. Inspect the JS ignore-list and patch it (override the published asset or ship your own Nova::script) if selection is broken.
  • New-tab affordance. Most implementations call window.location on click, which means cmd/ctrl-click won't open a new tab. If power users expect that, wrap the row in a real anchor or add event.metaKey/ctrlKey handling in the listener.
  • Accessibility. A clickable <tr> is not keyboard-accessible. Keep the first-column title link intact so screen readers and keyboard users can navigate; treat the row click as an enhancement, not the only path.
  • Debugging. Open devtools, select the row, and inspect event listeners on the table element. If no delegated listener exists, the asset didn't load (network tab, 404). If it exists but does nothing, log event.target and confirm your ignore-list isn't swallowing the click.
  • Extension point. The cleanest customization is to bypass the package and register your own script in the service provider with the same delegated-listener pattern — you control the selectors, the ignore list, and the URL derivation, and you remove a dead dependency. Given the archive status, this is often the right long-term call.
  • Config quirks. If you publish config, remember it is read at boot; changing it requires php artisan config:clear. Keep the published copy in version control and diff it against the package default when upgrading.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums