Skip to content

Callbacks and hooks

Those configuration options allow you to hook into the instance lifecycle and perform various operations.

keytypedescriptiondefault behavior
valueFormatterasync (value, instance) => stringFormats the value to be displayedUses the type to generate a string
onOpenasync (instance) => anyCalled when the instance is triggered and opens its edition session() => null
onCloseasync (instance) => anyCalled when the instance closes its edition session() => null
onDestroyasync (instance) => anyCalled when the flyter instance is manually destroyed() => null
onSubmitasync (value, instance) => anyCalled when submitting the value, can be used to override the default server handlerSimple server handler (see server section)
onLoading(status: boolean, instance) => anyCalled when the instance (not in edition) is in loading mode() => null
onRendererLoading(status: boolean, instance) => anyCalled when the renderer (instance in edition) is in loading mode() => null
onErrorasync (error, instance) => anyCalled when an error is thrown somewhere(e) => console.log(e)
onCancelasync (instance) => anyCalled when an edition session is canceled() => null
onDisabledasync (instance) => anyCalled when a Flyter instance is disabled() => null
onEnabledasync (instance) => anyCalled when a Flyter instance is enabled() => null
validate`async (value, instance) => booleanError`Can be used to validate the submitted value, before calling the onSubmit callback