From e396afa74bc064ed2a760bacf802d951b4e51986 Mon Sep 17 00:00:00 2001 From: OlgaLarina Date: Thu, 7 Mar 2024 16:37:53 +0300 Subject: [PATCH] work for #4842 --- src/mask/mask_pattern.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mask/mask_pattern.ts b/src/mask/mask_pattern.ts index 3b31a95ee3..ec63f48afa 100644 --- a/src/mask/mask_pattern.ts +++ b/src/mask/mask_pattern.ts @@ -2,6 +2,7 @@ import { settings } from "../settings"; import { Serializer, property } from "../jsonobject"; import { InputMaskBase } from "./mask_base"; import { IMaskedInputResult, ITextInputParams } from "./mask_utils"; +import { ILoadFromJSONOptions } from "../base-interfaces"; export interface IMaskLiteral { type: "const" | "regex" | "fixed"; @@ -115,6 +116,11 @@ export class InputMaskPattern extends InputMaskBase { return "patternmask"; } + public fromJSON(json: any, options?: ILoadFromJSONOptions): void { + super.fromJSON(json, options); + this.updateLiterals(); + } + public _getMaskedValue(src: string, matchWholeMask: boolean = false): string { const input = (src === undefined || src === null) ? "" : src; return getMaskedValueByPattern(input, this.literals, matchWholeMask);