js: fix when first input, onTextChange or onSubmitEditing pass editing undefined

This commit is contained in:
pengfei.zhou 2022-12-15 19:04:02 +08:00 committed by osborn
parent 2cfab62e11
commit c60754c53d
3 changed files with 6 additions and 6 deletions

4
doric-js/index.d.ts vendored
View File

@ -1255,13 +1255,13 @@ declare module "doric" {
hintTextColor?: Color;
multiline?: boolean;
textAlignment?: Gravity;
onTextChange?: (text: string) => void;
onTextChange?: (text?: string) => void;
onFocusChange?: (focused: boolean) => void;
maxLength?: number;
password?: boolean;
editable?: boolean;
returnKeyType?: ReturnKeyType;
onSubmitEditing?: (text: string) => void;
onSubmitEditing?: (text?: string) => void;
enableHorizontalScrollBar?: boolean;
enableVerticalScrollBar?: boolean;
/**

View File

@ -21,13 +21,13 @@ export declare class Input extends View {
hintTextColor?: Color;
multiline?: boolean;
textAlignment?: Gravity;
onTextChange?: (text: string) => void;
onTextChange?: (text?: string) => void;
onFocusChange?: (focused: boolean) => void;
maxLength?: number;
password?: boolean;
editable?: boolean;
returnKeyType?: ReturnKeyType;
onSubmitEditing?: (text: string) => void;
onSubmitEditing?: (text?: string) => void;
enableHorizontalScrollBar?: boolean;
enableVerticalScrollBar?: boolean;
/**

View File

@ -61,7 +61,7 @@ export class Input extends View {
textAlignment?: Gravity
@Property
onTextChange?: (text: string) => void
onTextChange?: (text?: string) => void
@Property
onFocusChange?: (focused: boolean) => void
@ -79,7 +79,7 @@ export class Input extends View {
returnKeyType?: ReturnKeyType
@Property
onSubmitEditing?: (text: string) => void
onSubmitEditing?: (text?: string) => void
@Property
enableHorizontalScrollBar?: boolean