-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move search functionality to other component * Simplify overview search for later reuse * Pass event to toolbar to show filters * Reuse search window from overview * Use reset whenever possible for logic standard closes #376
- Loading branch information
Showing
18 changed files
with
215 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Subscription } from 'rxjs'; | ||
import { SearchDataService } from '@shared/remote-data.service'; | ||
import { SearchDataService, LogbookDataService } from '@shared/remote-data.service'; | ||
import { ScrollBaseService } from '@shared/scroll-base.service'; | ||
|
||
@Injectable() | ||
export class SearchScrollService extends ScrollBaseService { | ||
|
||
currentViewSubscription: Subscription = null; | ||
export class SearchScrollBaseService extends ScrollBaseService { | ||
|
||
protected dataService: SearchDataService | LogbookDataService | ||
|
||
private setSearchString(searchString: string) { | ||
this.dataService.searchString = searchString; | ||
} | ||
|
||
reset(searchString?: string) { | ||
this.setSearchString(searchString); | ||
super.reset(); | ||
} | ||
|
||
} | ||
|
||
@Injectable({ providedIn: 'root' }) | ||
export class SearchScrollService extends SearchScrollBaseService { | ||
|
||
constructor( | ||
private searchDataService: SearchDataService, | ||
) { | ||
protected dataService: SearchDataService, | ||
) { | ||
super(); | ||
} | ||
|
||
|
||
getDataBuffer(index:number, count:number, config:any){ | ||
return this.searchDataService.getDataBuffer(index, count, config); | ||
return this.dataService.getDataBuffer(index, count, config); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.