How to disable row clicks? #4390
-
Description:How is it possible to disable the row click event? there is already a "view button" and sometimes users want to copy text from the index page, but whenever clicked on the index somewhere to copy, it will open, anyway to disable that? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
You can make Text fields copyable to avoid this issue. There is no built-in way to disable it. There maybe some way to override it in vue but not sure. |
Beta Was this translation helpful? Give feedback.
-
There is a package for configuring the index row click: https://github.com/marshmallow-packages/nova-resource-click Although this imo should be in core. |
Beta Was this translation helpful? Give feedback.
-
https://nova.laravel.com/docs/4.0/resources/#resource-table-click-action We can set $clickAction to ignore in each resource to disable index row click File path : /vendor/laravel/nova/src/Resource.php:197
Hope it can help someone |
Beta Was this translation helpful? Give feedback.
-
Set the <?php
namespace App\Nova;
use Laravel\Nova\Http\Requests\NovaRequest;
use Laravel\Nova\Resource as NovaResource;
abstract class Resource extends NovaResource
{
/**
* The click action to use when clicking on the resource in the table.
* Can be one of: 'detail' (default), 'edit', 'select', 'preview', or 'ignore'.
*
* @var string
*/
public static $clickAction = 'ignore';
// ...
} |
Beta Was this translation helpful? Give feedback.
Set the
clickAction
property on the baseResource
Nova publishes during installation: