onView()
This event handler runs when a specific element becomes visible on the page.
Overview
Usage
import { init, Form } from '@feathery/react';
function App() {
// Initialize Feathery
init('SDKKey', '[email protected]');
// Show the `aBcDeF` Feathery form
return <Form
formId='aBcDeF'
onViewElements={['field-id']}
// Custom form step onView logic
onView={(context) => {
const { elementId, isVisible } = context.visibilityStatus;
if (elementId === 'field-id' && isVisible]) {
importantTextIsVisible();
}
}}
/>
}Context API
Key
Type
Description
Last updated
Was this helpful?