Skip to content

Commit 6bd0578

Browse files
committed
Update __name@dasherize__.component.ts.template
1 parent 39ae6fe commit 6bd0578

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ng-generate/components/table/generators/components/table/files/__name@dasherize__.component.ts.template

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ import {<%= classify(name) %>ColumnMenuComponent} from './<%= dasherize(name) %>
7272
import {filter, takeUntil} from 'rxjs/operators';
7373
<% } %>
7474

75-
import {<% if (options.enableRemoteDataHandling) { %>catchError, finalize, tap, <% } %>Subject} from 'rxjs';
75+
import {<% if (options.enableRemoteDataHandling) { %>catchError, finalize, tap, Subscription,<% } %>Subject} from 'rxjs';
7676

7777
<% if (options.enableRemoteDataHandling) { %>
7878
<%= options.include('/remote-handling/imports.ts.template') %>
@@ -222,7 +222,10 @@ export class <%= classify(name) %>Component implements OnInit, AfterViewInit, Af
222222

223223
<% if (options.hasSearchBar || options.enableRemoteDataHandling) { %>
224224
private readonly ngUnsubscribe = new Subject<void>();
225-
private requestSubscription: Subscription;
225+
<% } %>
226+
227+
<% if (options.hasSearchBar && options.enableRemoteDataHandling) { %>
228+
private requestSubscription: Subscription = = new Subscription();
226229
<% } %>
227230

228231
<% if (options.enableRemoteDataHandling) { %>

0 commit comments

Comments
 (0)