Lint fixes
This commit is contained in:
@@ -84,7 +84,7 @@ export class BookBrowserComponent implements OnInit {
|
||||
entityType: EntityType | undefined;
|
||||
bookTitle: string = '';
|
||||
entityOptions: MenuItem[] | undefined;
|
||||
selectedBooks: Set<number> = new Set();
|
||||
selectedBooks = new Set<number>();
|
||||
selectedSort: SortOption | null = null;
|
||||
sortOptions: SortOption[] = [];
|
||||
isDrawerVisible: boolean = false;
|
||||
|
||||
@@ -23,7 +23,7 @@ import {SortOption} from '../../../model/sort.model';
|
||||
})
|
||||
export class BookTableComponent implements OnChanges {
|
||||
selectedBooks: Book[] = [];
|
||||
selectedBookIds: Set<number> = new Set();
|
||||
selectedBookIds = new Set<number>();
|
||||
|
||||
@Output() selectedBooksChange = new EventEmitter<Set<number>>();
|
||||
@Input() books: Book[] = [];
|
||||
@@ -34,7 +34,7 @@ export class BookTableComponent implements OnChanges {
|
||||
|
||||
// Hack to set virtual-scroller height
|
||||
ngOnChanges() {
|
||||
let wrapperElements: HTMLCollection = document.getElementsByClassName('p-virtualscroller');
|
||||
const wrapperElements: HTMLCollection = document.getElementsByClassName('p-virtualscroller');
|
||||
Array.prototype.forEach.call(wrapperElements, function (wrapperElement) {
|
||||
wrapperElement.style["height"] = 'calc(100vh - 160px)';
|
||||
});
|
||||
|
||||
@@ -42,7 +42,7 @@ export class ShelfAssignerComponent implements OnInit {
|
||||
selectedShelves: Shelf[] = [];
|
||||
displayShelfDialog: boolean = false;
|
||||
shelfName: string = '';
|
||||
bookIds: Set<number> = new Set();
|
||||
bookIds = new Set<number>();
|
||||
isMultiBooks: boolean = false;
|
||||
selectedIcon: string | null = null;
|
||||
|
||||
@@ -92,7 +92,7 @@ export class ShelfAssignerComponent implements OnInit {
|
||||
}
|
||||
|
||||
updateBooksShelves(): void {
|
||||
const idsToAssign: Set<number | undefined> = new Set(this.selectedShelves.map(shelf => shelf.id));
|
||||
const idsToAssign = new Set<number | undefined>(this.selectedShelves.map(shelf => shelf.id));
|
||||
const idsToUnassign: Set<number> = this.isMultiBooks ? new Set() : this.getIdsToUnAssign(this.book, idsToAssign);
|
||||
const bookIds = this.isMultiBooks ? this.bookIds : new Set([this.book.id]);
|
||||
this.updateBookShelves(bookIds, idsToAssign, idsToUnassign);
|
||||
|
||||
Reference in New Issue
Block a user