Roqueform
    Preparing search index...

    Module plugin/scroll-to-error

    Enhances Roqueform fields with methods to scroll to the closest invalid field.

    import { createField } from 'roqueform';
    import scrollToErrorPlugin from 'roqueform/plugin/scroll-to-error';

    const field = createField({ hello: 'world' }, [scrollToErrorPlugin()]);

    field.at('hello').ref(document.querySelector('input'));

    field.at('hello').isInvalid = true;

    field.scrollToError();
    // ⮕ field.at('hello')

    Interfaces

    ScrollToErrorMixin

    Functions

    default