tanmuhittin/nova-scroll-top

On route change scrolls to the top

Installs: 193 473

Dependents: 0

Suggesters: 0

Security: 0

Stars: 22

Watchers: 3

Forks: 9

Open Issues: 6

Language:JavaScript

0.6 2020-08-03 18:27 UTC

This package is auto-updated.

Last update: 2024-10-25 05:06:04 UTC


README

On route change scroll to the top of the page. On 422 error scroll to the first erroneous field.
You can install this package via:
composer require tanmuhittin/nova-scroll-top

If you do not want to use scroll to erroneous field trait or scroll to the top on page load trait you can set this on config file. First publish it via:
php artisan vendor:publish --provider=TanMuhittin\\NovaScrollTop\\ScrollTopServiceProvider

    /**
     * Scroll to the top of the page on route change
     */
    'on_route_change' => true,

    /**
     * Scroll to the first erroneous field on 422 ajax errors
     */
    'on_error' => true,