Mobile Document Scanner API Reference / ButtonSettings
Interface: ButtonSettings<Button>
Defined in: src/settings/buttons.ts:110
The settings of one button.
Type Parameters
Button
Button extends string = string
Properties
hidden?
optionalhidden?:boolean
Defined in: src/settings/buttons.ts:121
Whether the screen hides the button. A hidden toggle, such as autoCapture, keeps the value that the settings give it, so the user cannot change it. If the host application hides a way out of a screen, such as cancel, it must give the user another way out. If the host application hides the rectify button of the edit screen, the fromEdit mode of the rectify screen turns off. If it hides the filter button, the filter mode turns off.
Default Value
false
onClick?
optionalonClick?: (event) =>void|Promise<void>
Defined in: src/settings/buttons.ts:131
The handler that runs before the default action of the button. The default action then runs, unless the handler called preventDefault(). While the handler and the default action run, other presses do nothing. Only the cancel button of the capture screen still works. If the handler throws or its promise rejects, the document scanner reports the error to the console. The default action then runs, unless the handler called preventDefault() before the error.
Parameters
event
ButtonEvent<Button>
Returns
void | Promise<void>