mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-02 17:35:08 +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 {
|
export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy {
|
||||||
|
|
||||||
static MAX_NAME_LENGTH: number = 255;
|
static MAX_NAME_LENGTH: number = 255;
|
||||||
|
static PROCESS_DEFINITION_DEBOUNCE: number = 300;
|
||||||
|
static PROCESS_FORM_DEBOUNCE: number = 400;
|
||||||
|
|
||||||
@ViewChild(MatAutocompleteTrigger)
|
@ViewChild(MatAutocompleteTrigger)
|
||||||
inputAutocomplete: MatAutocompleteTrigger;
|
inputAutocomplete: MatAutocompleteTrigger;
|
||||||
@ -118,7 +120,7 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.processDefinition.valueChanges
|
this.processDefinition.valueChanges
|
||||||
.pipe(debounceTime(500))
|
.pipe(debounceTime(StartProcessCloudComponent.PROCESS_DEFINITION_DEBOUNCE))
|
||||||
.pipe(takeUntil(this.onDestroy$))
|
.pipe(takeUntil(this.onDestroy$))
|
||||||
.subscribe((processDefinitionName) => {
|
.subscribe((processDefinitionName) => {
|
||||||
this.selectProcessDefinitionByProcesDefinitionName(processDefinitionName);
|
this.selectProcessDefinitionByProcesDefinitionName(processDefinitionName);
|
||||||
@ -126,7 +128,7 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy
|
|||||||
|
|
||||||
this.processForm.valueChanges
|
this.processForm.valueChanges
|
||||||
.pipe(
|
.pipe(
|
||||||
debounceTime(400),
|
debounceTime(StartProcessCloudComponent.PROCESS_FORM_DEBOUNCE),
|
||||||
tap(() => this.disableStartButton = true),
|
tap(() => this.disableStartButton = true),
|
||||||
distinctUntilChanged(),
|
distinctUntilChanged(),
|
||||||
filter(() => this.isProcessSelectionValid()),
|
filter(() => this.isProcessSelectionValid()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user