Added sorting (Fixes #15)

This commit is contained in:
Zakary Timson 2018-07-15 12:48:24 -04:00
parent 453d42e1ae
commit dfa54c9f50
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ export class FormulaManagerComponent {
} }
constructor(private db: AngularFirestore, public electron: ElectronService) { constructor(private db: AngularFirestore, public electron: ElectronService) {
this.formulas = this.db.collection('formulas').valueChanges(); this.formulas = this.db.collection('formulas', ref => ref.orderBy('name')).valueChanges();
} }
displayFormula(formula) { displayFormula(formula) {

View File

@ -34,7 +34,7 @@ export class CategoriesComponent {
if (!this.category) this.breadcrumb.clear(); if (!this.category) this.breadcrumb.clear();
this.categories = this.db this.categories = this.db
.collection('categories') .collection('categories', ref => ref.orderBy('name'))
.valueChanges() .valueChanges()
.pipe( .pipe(
map(rows => map(rows =>