mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[AC-4313] - Add missing sorting in list component on init (#3377)
This commit is contained in:
@@ -68,7 +68,7 @@ export class DocumentListDirective implements OnInit, OnDestroy {
|
|||||||
if (this.sortingPreferenceKey) {
|
if (this.sortingPreferenceKey) {
|
||||||
const current = this.documentList.sorting;
|
const current = this.documentList.sorting;
|
||||||
|
|
||||||
const key = this.preferences.get(`${this.sortingPreferenceKey}.sorting.key`, current[0]);
|
const key = this.preferences.get(`${this.sortingPreferenceKey}.sorting.sortingKey`, current[0]);
|
||||||
const direction = this.preferences.get(`${this.sortingPreferenceKey}.sorting.direction`, current[1]);
|
const direction = this.preferences.get(`${this.sortingPreferenceKey}.sorting.direction`, current[1]);
|
||||||
|
|
||||||
this.documentList.sorting = [key, direction];
|
this.documentList.sorting = [key, direction];
|
||||||
@@ -101,6 +101,7 @@ export class DocumentListDirective implements OnInit, OnDestroy {
|
|||||||
onSortingChanged(event: CustomEvent) {
|
onSortingChanged(event: CustomEvent) {
|
||||||
if (this.sortingPreferenceKey) {
|
if (this.sortingPreferenceKey) {
|
||||||
this.preferences.set(`${this.sortingPreferenceKey}.sorting.key`, event.detail.key);
|
this.preferences.set(`${this.sortingPreferenceKey}.sorting.key`, event.detail.key);
|
||||||
|
this.preferences.set(`${this.sortingPreferenceKey}.sorting.sortingKey`, event.detail.sortingKey);
|
||||||
this.preferences.set(`${this.sortingPreferenceKey}.sorting.direction`, event.detail.direction);
|
this.preferences.set(`${this.sortingPreferenceKey}.sorting.direction`, event.detail.direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user