fix: onInit and onRender are always called with the instance

This commit is contained in:
tjallingt 2023-10-27 15:10:12 +02:00 committed by GitHub
parent 6721d6aa7d
commit d5419b9930
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -264,12 +264,12 @@ export interface KeyboardOptions {
/** /**
* Executes the callback function every time simple-keyboard is rendered (e.g: when you change layouts). * Executes the callback function every time simple-keyboard is rendered (e.g: when you change layouts).
*/ */
onRender?: (instance?: SimpleKeyboard) => void; onRender?: (instance: SimpleKeyboard) => void;
/** /**
* Executes the callback function once simple-keyboard is rendered for the first time (on initialization). * Executes the callback function once simple-keyboard is rendered for the first time (on initialization).
*/ */
onInit?: (instance?: SimpleKeyboard) => void; onInit?: (instance: SimpleKeyboard) => void;
/** /**
* Retrieves the current input * Retrieves the current input
@ -295,4 +295,4 @@ export interface KeyboardOptions {
* Module options can have any format * Module options can have any format
*/ */
[name: string]: any; [name: string]: any;
} }