You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[idea] Make second parameter of /list an Observable, not just the inner values #389
Now one step further: I'd like to be able to show either active employees or ALL employees (both active and inactive). I would like to have something like this:
this.filteredItems = af.database.list('employees', this.querySubject });
toggleActiveFilter() {
this.showActive = !this.showActive;
if (this.showActive) {
// Show active employees only
this.querySubject.next({
query: {
orderByChild: 'active',
equalTo: true
}
});
} else {
// show all employees
this.querySubject.next(null);
}
}
Basically: make the second parameter itself an Observable in stead of just the inner values of e.g. equalTo.
@dirkpostma Is that mean that way we can have filter on top of another filter? If so, that's really a good idea.
According to my understanding, right now there is no way we can do filter on top of filter, right? Like in your example, we can only get employees active, but can not get active employee with certain last name. Am I right?
Activity
agu-z commentedon Aug 4, 2016
I'm not sure if exactly that is what we need but I think we should be able to accomplish it.
joyceview commentedon Aug 14, 2016
@dirkpostma Is that mean that way we can have filter on top of another filter? If so, that's really a good idea.
According to my understanding, right now there is no way we can do filter on top of filter, right? Like in your example, we can only get employees active, but can not get active employee with certain last name. Am I right?
katowulf commentedon Aug 25, 2016
It's not going to be possible to use multiple filter criteria since this isn't supported by the SDK.
It seems like it would be a nice addition to make this.query observable instead of this.querySubject.
For the original problem, could we not take advantage of the ordering criteria and simply using
startAt, changing the setup as follows?davideast commentedon Jan 13, 2017
Active conversation in #770.
feat(database): adds auditTime for queries
feat(database): adds auditTime for queries