feat:Input add beforeTextChange API

This commit is contained in:
pengfei.zhou
2021-06-11 17:47:06 +08:00
committed by osborn
parent e528630f71
commit 9fed9e431c
11 changed files with 95 additions and 2 deletions

View File

@@ -26,6 +26,12 @@ export declare class Input extends View {
editable?: boolean;
returnKeyType?: ReturnKeyType;
onSubmitEditing?: (text: string) => void;
beforeTextChange?: (change: {
editing: string;
start: number;
length: number;
replacement: string;
}) => boolean;
getText(context: BridgeContext): Promise<string>;
setSelection(context: BridgeContext, start: number, end?: number): Promise<any>;
getSelection(context: BridgeContext): Promise<{

View File

@@ -115,6 +115,10 @@ __decorate([
Property,
__metadata("design:type", Function)
], Input.prototype, "onSubmitEditing", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], Input.prototype, "beforeTextChange", void 0);
export var InputType;
(function (InputType) {
InputType[InputType["Default"] = 0] = "Default";