chayns-api 2.6.10 → 2.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -617,7 +617,8 @@ class AppWrapper {
|
|
|
617
617
|
},
|
|
618
618
|
createDialog: config => {
|
|
619
619
|
if (config.type === _IChaynsReact.DialogType.INPUT && typeof config.formatter === 'function') {
|
|
620
|
-
|
|
620
|
+
console.warn('[chayns-api] passing a function as formatter is not supported in the app environment, the formatter will be ignored');
|
|
621
|
+
delete config.formatter;
|
|
621
622
|
}
|
|
622
623
|
return new _DialogHandler.default(config, this.functions.openDialog, this.functions.closeDialog, this.functions.dispatchEventToDialogClient, this.functions.addDialogClientEventListener);
|
|
623
624
|
},
|
|
@@ -579,7 +579,8 @@ export class AppWrapper {
|
|
|
579
579
|
},
|
|
580
580
|
createDialog: config => {
|
|
581
581
|
if (config.type === DialogType.INPUT && typeof config.formatter === 'function') {
|
|
582
|
-
|
|
582
|
+
console.warn('[chayns-api] passing a function as formatter is not supported in the app environment, the formatter will be ignored');
|
|
583
|
+
delete config.formatter;
|
|
583
584
|
}
|
|
584
585
|
return new DialogHandler(config, this.functions.openDialog, this.functions.closeDialog, this.functions.dispatchEventToDialogClient, this.functions.addDialogClientEventListener);
|
|
585
586
|
},
|
|
@@ -128,6 +128,11 @@ export interface DialogInput {
|
|
|
128
128
|
placeholder?: string;
|
|
129
129
|
inputType?: DialogInputType;
|
|
130
130
|
defaultValue?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Formats the input value shown in the dialog.
|
|
133
|
+
* Not supported in app environments due to security reasons.
|
|
134
|
+
* @param input
|
|
135
|
+
*/
|
|
131
136
|
formatter?: (input: string) => string;
|
|
132
137
|
regex?: string;
|
|
133
138
|
}
|