From 6a056bbe4df1c29039d46df2b7937163033a5585 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 13 Jan 2023 09:30:47 +0100 Subject: Increase textarea debounce time for custom markup --- .../app/+admin/config/edit-custom-config/edit-homepage.component.html | 2 +- .../edit-custom-config/edit-instance-information.component.html | 2 +- client/src/app/shared/shared-forms/markdown-textarea.component.ts | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html index 5339240bb..3d8414f5c 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html @@ -17,7 +17,7 @@ diff --git a/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html b/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html index b54733327..504afa189 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html @@ -38,7 +38,7 @@ diff --git a/client/src/app/shared/shared-forms/markdown-textarea.component.ts b/client/src/app/shared/shared-forms/markdown-textarea.component.ts index e3371f22c..c6527e169 100644 --- a/client/src/app/shared/shared-forms/markdown-textarea.component.ts +++ b/client/src/app/shared/shared-forms/markdown-textarea.component.ts @@ -31,6 +31,8 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { @Input() markdownType: 'text' | 'enhanced' = 'text' @Input() customMarkdownRenderer?: (text: string) => Promise + @Input() debounceTime = 150 + @Input() markdownVideo: Video @Input() name = 'description' @@ -59,7 +61,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { ngOnInit () { this.contentChanged .pipe( - debounceTime(150), + debounceTime(this.debounceTime), distinctUntilChanged() ) .subscribe(() => this.updatePreviews()) -- cgit v1.2.3