-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
5 changed files
with
72 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export class TableSettings { | ||
public sortActiveId = ''; // The ID of the column the table is sorted by | ||
public sortDirection = ''; | ||
public pageSize = 20; | ||
public pageIndex = 0; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { TableSettings } from '../models/table-settings.model'; | ||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
|
||
/** | ||
* Responsible for storing and retrieving the table settings for issue tables created | ||
* Map is required since there can be multiple tables within the same page | ||
*/ | ||
export class IssueTableSettingsService { | ||
private _tableSettingsMap: { [index: string]: TableSettings } = {}; | ||
|
||
public getTableSettings(tableName: string): TableSettings { | ||
return this._tableSettingsMap[tableName] || new TableSettings(); | ||
} | ||
|
||
public setTableSettings(tableName: string, tableSettings: TableSettings): void { | ||
this._tableSettingsMap[tableName] = tableSettings; | ||
} | ||
|
||
public clearTableSettings(): void { | ||
this._tableSettingsMap = {}; | ||
} | ||
} |
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