Merge pull request #3435 from vvlladd28/improvment/widget-bundle/sort
Added sorting of widget bundles by name
This commit is contained in:
commit
5f7a4edd5f
@ -37,6 +37,7 @@ import { getCurrentAuthUser } from '@app/core/auth/auth.selectors';
|
|||||||
import { Authority } from '@shared/models/authority.enum';
|
import { Authority } from '@shared/models/authority.enum';
|
||||||
import { DialogService } from '@core/services/dialog.service';
|
import { DialogService } from '@core/services/dialog.service';
|
||||||
import { ImportExportService } from '@home/components/import-export/import-export.service';
|
import { ImportExportService } from '@home/components/import-export/import-export.service';
|
||||||
|
import { Direction } from "@shared/models/page/sort-order";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableConfig<WidgetsBundle>> {
|
export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableConfig<WidgetsBundle>> {
|
||||||
@ -55,6 +56,7 @@ export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableCon
|
|||||||
this.config.entityComponent = WidgetsBundleComponent;
|
this.config.entityComponent = WidgetsBundleComponent;
|
||||||
this.config.entityTranslations = entityTypeTranslations.get(EntityType.WIDGETS_BUNDLE);
|
this.config.entityTranslations = entityTypeTranslations.get(EntityType.WIDGETS_BUNDLE);
|
||||||
this.config.entityResources = entityTypeResources.get(EntityType.WIDGETS_BUNDLE);
|
this.config.entityResources = entityTypeResources.get(EntityType.WIDGETS_BUNDLE);
|
||||||
|
this.config.defaultSortOrder = {property: 'title', direction: Direction.ASC};
|
||||||
|
|
||||||
this.config.entityTitle = (widgetsBundle) => widgetsBundle ?
|
this.config.entityTitle = (widgetsBundle) => widgetsBundle ?
|
||||||
widgetsBundle.title : '';
|
widgetsBundle.title : '';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user