@tiller-ds/formik-elements
Version:
Formik elements module of Tiller Design System
9 lines (8 loc) • 311 B
TypeScript
/**
* A hook that enables scrolling of the viewport to the first form element in a Formik form with an error.
*
* The same functionality can be enabled directly through the `scrollToError` prop of `FormContainer` component.
*
* @returns {void}
*/
export default function useScrollToError(): void;