Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application gets stuck each time. #76

Open
adnanrafique opened this issue Apr 16, 2019 · 0 comments
Open

Application gets stuck each time. #76

adnanrafique opened this issue Apr 16, 2019 · 0 comments

Comments

@adnanrafique
Copy link

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [ ] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request

Bug report

I am using angular 7. In my application I have a bootstrap modal with the users list and in that modal I've implemented search filter. Modal works fine untill I apply filterBy in the ngFor loop

My code is as follows.

Typescript:
//declaration
individualSearchFilter: any = {first_name:''};

//Users List array
this._api.students_list(this.course_id).subscribe(
data => { this.studentsList = data;
} );

And In my HTML:
Search field:
<div class="modal-header"> <h5>Select User</h5> <div class="userSearchField"> <input type="text" [(ngModel)]="individualSearchFilter.first_name" name="first_name" class="form-control" placeholder="Search by first name"> </div> </div>

ngFor Loop:

<div *ngFor="let student of studentsList | filterBy:individualSearchFilter">...</div>

When I click on the button to open the modal containing users list and search modal does not open and system gets stuck. There is nothing wrong with the modal. When I remove

filterBy:individualSearchFilter

from the ngFor Loop everything works fine except the search(obviously).

Please let me know what I am doing wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant