File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1717import { Constants } from "./constants.js" ;
1818import HTTPAPILayer from "./HTTPAPILayer.js" ;
1919import { customFunctions } from "./customFunctions.js" ;
20- import { FunctionRuntime , FormRendered } from '@aemforms/af-core' ;
20+ import { FunctionRuntime , CustomEvent } from '@aemforms/af-core' ;
2121import { loadXfa } from "./handleXfa" ;
2222import RuleUtils from "./RuleUtils.js" ;
2323
@@ -355,12 +355,12 @@ class Utils {
355355 Utils . initializeAllFields ( formContainer ) ;
356356 const event = new CustomEvent ( Constants . FORM_CONTAINER_INITIALISED , { "detail" : formContainer } ) ;
357357 document . dispatchEvent ( event ) ;
358- // Dispatch formRendered event after form is fully rendered
358+ // Dispatch custom:formViewInitialized event after form is fully rendered
359359 if ( formContainer && formContainer . _model ) {
360360 try {
361- formContainer . _model . dispatch ( new FormRendered ( ) ) ;
361+ formContainer . _model . dispatch ( new CustomEvent ( 'formViewInitialized' , { } , true ) ) ;
362362 } catch ( error ) {
363- console . warn ( 'Failed to dispatch formRendered event:' , error ) ;
363+ console . warn ( 'Failed to dispatch custom:formViewInitialized event:' , error ) ;
364364 }
365365 }
366366 }
You can’t perform that action at this time.
0 commit comments