mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-4985] Resolved minor issue where the reset method would still trigger multiple api calls when used with the TabbedComponent
This commit is contained in:
committed by
Jatin_Chugh
parent
9b38a8b48b
commit
2ae8b4b510
+3
-1
@@ -95,7 +95,9 @@ export class SearchCheckListComponent implements SearchWidget, OnInit {
|
|||||||
this.clearOptions();
|
this.clearOptions();
|
||||||
if (this.id && this.context) {
|
if (this.id && this.context) {
|
||||||
this.updateDisplayValue();
|
this.updateDisplayValue();
|
||||||
this.context.update();
|
if (!this.disableUpdateOnSubmit) {
|
||||||
|
this.context.update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -68,7 +68,6 @@ export class SearchDateRangeAdvancedComponent implements SearchWidget, OnInit, O
|
|||||||
DateRangeType = DateRangeType;
|
DateRangeType = DateRangeType;
|
||||||
InLastDateType = InLastDateType;
|
InLastDateType = InLastDateType;
|
||||||
|
|
||||||
private enableChangeUpdate: boolean;
|
|
||||||
private datePickerFormat: string;
|
private datePickerFormat: string;
|
||||||
|
|
||||||
private onDestroy$ = new Subject<void>();
|
private onDestroy$ = new Subject<void>();
|
||||||
@@ -87,7 +86,6 @@ export class SearchDateRangeAdvancedComponent implements SearchWidget, OnInit, O
|
|||||||
this.maxDate = moment(this.settings.maxDate).endOf('day');
|
this.maxDate = moment(this.settings.maxDate).endOf('day');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.enableChangeUpdate = this.settings?.allowUpdateOnChange ?? true;
|
|
||||||
|
|
||||||
this.userPreferencesService
|
this.userPreferencesService
|
||||||
.select(UserPreferenceValues.Locale)
|
.select(UserPreferenceValues.Locale)
|
||||||
@@ -164,7 +162,7 @@ export class SearchDateRangeAdvancedComponent implements SearchWidget, OnInit, O
|
|||||||
|
|
||||||
if (this.id && this.context) {
|
if (this.id && this.context) {
|
||||||
this.context.queryFragments[this.id] = '';
|
this.context.queryFragments[this.id] = '';
|
||||||
if (this.enableChangeUpdate) {
|
if (!this.disableUpdateOnSubmit) {
|
||||||
this.updateQuery();
|
this.updateQuery();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -217,7 +217,9 @@ export class SearchDateRangeComponent implements SearchWidget, OnInit, OnDestroy
|
|||||||
private updateQuery() {
|
private updateQuery() {
|
||||||
if (this.id && this.context) {
|
if (this.id && this.context) {
|
||||||
this.updateDisplayValue();
|
this.updateDisplayValue();
|
||||||
this.context.update();
|
if (!this.disableUpdateOnSubmit) {
|
||||||
|
this.context.update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -205,7 +205,9 @@ export class SearchDatetimeRangeComponent implements SearchWidget, OnInit, OnDes
|
|||||||
private updateQuery() {
|
private updateQuery() {
|
||||||
if (this.id && this.context) {
|
if (this.id && this.context) {
|
||||||
this.updateDisplayValue();
|
this.updateDisplayValue();
|
||||||
this.context.update();
|
if (!this.disableUpdateOnSubmit) {
|
||||||
|
this.context.update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -161,8 +161,10 @@ export class SearchNumberRangeComponent implements SearchWidget, OnInit {
|
|||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
this.clear();
|
this.clear();
|
||||||
if (this.id && this.context) {
|
if (!this.disableUpdateOnSubmit) {
|
||||||
this.context.update();
|
if (this.id && this.context) {
|
||||||
|
this.context.update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -147,7 +147,9 @@ export class SearchRadioComponent implements SearchWidget, OnInit {
|
|||||||
if (initialValue !== null) {
|
if (initialValue !== null) {
|
||||||
this.setValue(initialValue);
|
this.setValue(initialValue);
|
||||||
this.updateDisplayValue();
|
this.updateDisplayValue();
|
||||||
this.context.update();
|
if (!this.disableUpdateOnSubmit) {
|
||||||
|
this.context.update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -117,7 +117,9 @@ export class SearchSliderComponent implements SearchWidget, OnInit {
|
|||||||
} else {
|
} else {
|
||||||
this.context.queryFragments[this.id] = `${this.settings.field}:[0 TO ${value}]`;
|
this.context.queryFragments[this.id] = `${this.settings.field}:[0 TO ${value}]`;
|
||||||
}
|
}
|
||||||
this.context.update();
|
if (!this.disableUpdateOnSubmit) {
|
||||||
|
this.context.update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,9 @@ export class SearchTextComponent implements SearchWidget, OnInit {
|
|||||||
this.displayValue$.next(value);
|
this.displayValue$.next(value);
|
||||||
if (this.context && this.settings && this.settings.field) {
|
if (this.context && this.settings && this.settings.field) {
|
||||||
this.context.queryFragments[this.id] = value ? `${this.settings.field}:'${this.getSearchPrefix()}${value}${this.getSearchSuffix()}'` : '';
|
this.context.queryFragments[this.id] = value ? `${this.settings.field}:'${this.getSearchPrefix()}${value}${this.getSearchSuffix()}'` : '';
|
||||||
this.context.update();
|
if (!this.disableUpdateOnSubmit) {
|
||||||
|
this.context.update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user