js: fix when first input, beforeTextChange pass editing undefined (#562)
This commit is contained in:
parent
0668e0fe86
commit
2cfab62e11
4
doric-js/index.d.ts
vendored
4
doric-js/index.d.ts
vendored
@ -1274,10 +1274,10 @@ declare module "doric" {
|
|||||||
* @returns: true means the replacement will take effect, otherwise does not
|
* @returns: true means the replacement will take effect, otherwise does not
|
||||||
*/
|
*/
|
||||||
beforeTextChange?: (change: {
|
beforeTextChange?: (change: {
|
||||||
editing: string;
|
editing?: string;
|
||||||
start: number;
|
start: number;
|
||||||
length: number;
|
length: number;
|
||||||
replacement: string;
|
replacement?: string;
|
||||||
}) => boolean;
|
}) => boolean;
|
||||||
padding?: {
|
padding?: {
|
||||||
left?: number;
|
left?: number;
|
||||||
|
4
doric-js/lib/src/widget/input.d.ts
vendored
4
doric-js/lib/src/widget/input.d.ts
vendored
@ -40,10 +40,10 @@ export declare class Input extends View {
|
|||||||
* @returns: true means the replacement will take effect, otherwise does not
|
* @returns: true means the replacement will take effect, otherwise does not
|
||||||
*/
|
*/
|
||||||
beforeTextChange?: (change: {
|
beforeTextChange?: (change: {
|
||||||
editing: string;
|
editing?: string;
|
||||||
start: number;
|
start: number;
|
||||||
length: number;
|
length: number;
|
||||||
replacement: string;
|
replacement?: string;
|
||||||
}) => boolean;
|
}) => boolean;
|
||||||
padding?: {
|
padding?: {
|
||||||
left?: number;
|
left?: number;
|
||||||
|
@ -98,10 +98,10 @@ export class Input extends View {
|
|||||||
*/
|
*/
|
||||||
@Property
|
@Property
|
||||||
beforeTextChange?: (change: {
|
beforeTextChange?: (change: {
|
||||||
editing: string,
|
editing?: string,
|
||||||
start: number,
|
start: number,
|
||||||
length: number,
|
length: number,
|
||||||
replacement: string,
|
replacement?: string,
|
||||||
}) => boolean
|
}) => boolean
|
||||||
|
|
||||||
@Property
|
@Property
|
||||||
|
Reference in New Issue
Block a user