hi
I want Load Data should display data on basis of First Value in Dropdown for the first time. Using Angular 17
<mat-form-field class="example-full-width mb-3" appearance="outline">
<mat-label>Academic Class</mat-label>
<mat-select matInput formControlName="academicClassId" required>
@for (item of classList; track item.id) {
<mat-option [value]="item.id">{{item.name}}</mat-option>
}
</mat-select>
</mat-form-field>
public loadData() {
this.exampleDatabase = new StudentsService(this.htpClient,this._generic);
this.dataSource = new ExampleDataSource( this.exampleDatabase,this.paginator, this.sort );
this.subs.sink = this.paginator.page.subscribe(() => {
this.exampleDatabase?.getAllRegisteredStudents(this.paginator.pageIndex, this.paginator.pageSize);
});
this.subs.sink = this.sort.sortChange.subscribe(() => {
this.exampleDatabase?.getAllRegisteredStudents(this.paginator.pageIndex, this.paginator.pageSize);
});
}
Thanks