angular-generic-table
angular-generic-table copied to clipboard
[Violation] 'keyup' handler took long time : Browser Unresponsive
Browser becoming unresponsive when doing search. Also getting a violation like:
10:48:03.198 zone.js:1438 [Violation] 'keyup' handler took 532ms 10:48:03.711 zone.js:1438 [Violation] 'keyup' handler took 506ms 10:48:05.138 zone.js:1438 [Violation] 'keyup' handler took 520ms 10:48:05.640 zone.js:1438 [Violation] 'keyup' handler took 497ms
My code for search:
<input class="form-control form-control-sm mr-sm-2 mb-3 mb-sm-0" #pendingSearch (keyup)="pendingLeaveTable.gtSearch(pendingSearch.value)"
placeholder="Search">
Is there any way to do the search async?
Hmm, haven't seen or had any issues with this myself, are you doing something very demanding in your rendering or value functions perhaps? You could also try adding debounce to the key up event so it's not fired immediately to prevent it from executing the search to fast.