Skip to content

Instantly share code, notes, and snippets.

@travist
Last active March 31, 2023 16:42
Show Gist options
  • Save travist/b772e2d07ac62ef82b385cc76d955db7 to your computer and use it in GitHub Desktop.
Save travist/b772e2d07ac62ef82b385cc76d955db7 to your computer and use it in GitHub Desktop.
<formio-alerts [alerts]="service.alerts"></formio-alerts>
<formio-grid
[src]="gridSrc"
[query]="myQuery"
[onForm]="service.formLoaded"
(rowSelect)="onSelect($event)"
(error)="service.onError($event)"
(createItem)="onCreateItem()"
[createText]="createText"
></formio-grid>
import { Component } from '@angular/core';
import { FormioResourceIndexComponent } from '@formio/angular/resource';
@Component({
selector: 'app-index',
templateUrl: './index.html',
styleUrls: ['./index.scss']
})
export class IndexComponent extends FormioResourceIndexComponent {
public myQuery = {};
ngOnInit() {
super.ngOnInit();
this.service.formLoaded.then(() => {
this.service.loadParents().then(() => {
this.myQuery = this.gridQuery;
this.myQuery['data.parentId'] = '23423234234234';
});
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment