Type Alias: LunaticOptions
LunaticOptions:
object
Specific behaviour options defined in the useLunatic hook.
Type declaration
activeControls?
optional
activeControls:boolean
Enable data controls (form validation). (default: false
)
autoSuggesterLoading?
optional
autoSuggesterLoading:boolean
Enable the preemptive loading of suggester data on Lunatic initialization. (default: false
)
componentsOptions?
optional
componentsOptions:object
componentsOptions.detailAlwaysDisplayed?
optional
detailAlwaysDisplayed:boolean
disableFilters?
optional
disableFilters:boolean
Ignore filters. (default: false
)
dontKnowButton?
optional
dontKnowButton:string
"Don't know" button label.
features?
optional
features: ("MD"
|"VTL"
)[]
Enable VTL and Markdown support.
getReferentiel()?
optional
getReferentiel: (name
) =>Promise
<IndexEntry
[]>
Function called to fetch nomenclatures used by the suggesters.
Parameters
Parameter | Type |
---|---|
name | string |
Returns
Promise
<IndexEntry
[]>
initialPage?
optional
initialPage:PageTag
Starting page at launch. (default: "1"
)
lastReachedPage?
optional
lastReachedPage:PageTag
Furthest page the user ever reached.
logger?
optional
logger:LunaticLogger
management?
optional
management:boolean
Not yet implemented.
Enable management mode which allow to handle multiple states of the same variable (used by recovery positions).
The administrator can switch between COLLECTED
, EDITED
, INPUTTED
modes. (default: false
)
missing?
optional
missing:boolean
Enable missing system. (default: false
)
missingShortcut?
optional
missingShortcut:object
Keyboard shortcut that triggers missing buttons.
missingShortcut.dontKnow
dontKnow:
string
missingShortcut.refused
refused:
string
missingStrategy()?
optional
missingStrategy: () =>void
Function triggered when a missing button is clicked.
Returns
void
onChange?
optional
onChange:LunaticChangesHandler
Function called when a variable is changed by a user input (must be memoized as it is used in dependency of a useCallback
by the library).
onVariableChange()?
optional
onVariableChange: (event
) =>void
Parameters
Parameter | Type |
---|---|
event | LunaticVariablesStoreEvents ["change" ] |
Returns
void
preferences?
optional
preferences: ["COLLECTED"
]
refusedButton?
optional
refusedButton:string
"Refused" button label.
savingType?
optional
savingType:"COLLECTED"
Key in which the data is saved. (default: "COLLECTED"
)
shortcut?
optional
shortcut:boolean
Enable keyboard shortcuts for checkboxes, radio buttons and missing buttons (default: false
).
trackChanges?
optional
trackChanges:boolean
Enable change tracking to keep a track of what variable changed (allow using getChangedData()). (default: false
)
withOverview?
optional
withOverview:boolean
Enable overview system. (default: false
)