Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikstrasser committed Aug 17, 2024
1 parent eb2a9dc commit 6fa7093
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/components/simple-table/simple-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class SimpleTableComponent implements OnInit {
private init() {
if (this.list) {
this.list.catalog.query.applyOptions({
count: 5,
count: 10,
// sort: { order: ['ASC'], attributes: ['year'] },
});
this.loadData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h1 class="text-base font-semibold leading-6 text-gray-900">
(click)="toggleView()"
>
<ng-container *ngIf="viewMode === 'component'">
Show Code
Show Query
</ng-container>
<ng-container *ngIf="viewMode === 'code'">Show Table</ng-container>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class ComponentsOverviewComponent implements OnInit {
}

private async init() {
console.time('init dcupl');
const dcupl = new Dcupl({ config: { projectId: 'amNlybMblzqF2qcixBVT' } });

// create your loader, add the loader to your core and fetch the config
Expand All @@ -47,6 +48,7 @@ export class ComponentsOverviewComponent implements OnInit {
// dcupl.on((msg) => console.log(msg));

await dcupl.init();
console.timeEnd('init dcupl');

/**
* There is a model called "Styles" available containing 44k items
Expand All @@ -68,7 +70,7 @@ export class ComponentsOverviewComponent implements OnInit {
// Reset query - skip processing to avoid unnecessary updates
this.stylesList.catalog.query.reset({ skipProcessing: true });
// Apply the count option so we don't have to render 44k items
this.stylesList.catalog.query.applyOptions({ count: 5 });
this.stylesList.catalog.query.applyOptions({ count: 10 });
}

public toggleView() {
Expand Down

0 comments on commit 6fa7093

Please sign in to comment.