js: add comment for beforeTextChange

This commit is contained in:
王劲鹏 2021-07-22 18:38:47 +08:00 committed by osborn
parent fd6592f307
commit a1ded19836

View File

@ -81,6 +81,15 @@ export class Input extends View {
@Property @Property
onSubmitEditing?: (text: string) => void 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 @Property
beforeTextChange?: (change: { beforeTextChange?: (change: {
editing: string, editing: string,