From a1ded19836958053ae5200d3a2b0413354a753a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Thu, 22 Jul 2021 18:38:47 +0800 Subject: [PATCH] js: add comment for beforeTextChange --- doric-js/src/widget/input.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doric-js/src/widget/input.ts b/doric-js/src/widget/input.ts index 60021b6e..9f2a76bd 100644 --- a/doric-js/src/widget/input.ts +++ b/doric-js/src/widget/input.ts @@ -81,6 +81,15 @@ export class Input extends View { @Property onSubmitEditing?: (text: string) => void + /** + * Called before text is changed + * @param editing: text already in box + * @param replacement: text which will replace part of editing + * @param start: the start index of replacing part + * @param length: the length of replacing part + * + * @returns: true means the replacement will take effect, otherwise does not + */ @Property beforeTextChange?: (change: { editing: string,