mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[AAE-4973] - fixed start process button enabling when default process… (#6968)
* [AAE-4973] - fixed start process button enabling when default process is set * [AAE-4973] - added constants
This commit is contained in:
parent
a29594090f
commit
d369265e66
@ -39,6 +39,8 @@ import { ProcessNameCloudPipe } from '../../../pipes/process-name-cloud.pipe';
|
||||
export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy {
|
||||
|
||||
static MAX_NAME_LENGTH: number = 255;
|
||||
static PROCESS_DEFINITION_DEBOUNCE: number = 300;
|
||||
static PROCESS_FORM_DEBOUNCE: number = 400;
|
||||
|
||||
@ViewChild(MatAutocompleteTrigger)
|
||||
inputAutocomplete: MatAutocompleteTrigger;
|
||||
@ -118,7 +120,7 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy
|
||||
});
|
||||
|
||||
this.processDefinition.valueChanges
|
||||
.pipe(debounceTime(500))
|
||||
.pipe(debounceTime(StartProcessCloudComponent.PROCESS_DEFINITION_DEBOUNCE))
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe((processDefinitionName) => {
|
||||
this.selectProcessDefinitionByProcesDefinitionName(processDefinitionName);
|
||||
@ -126,7 +128,7 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy
|
||||
|
||||
this.processForm.valueChanges
|
||||
.pipe(
|
||||
debounceTime(400),
|
||||
debounceTime(StartProcessCloudComponent.PROCESS_FORM_DEBOUNCE),
|
||||
tap(() => this.disableStartButton = true),
|
||||
distinctUntilChanged(),
|
||||
filter(() => this.isProcessSelectionValid()),
|
||||
|
Loading…
x
Reference in New Issue
Block a user