Closed 19th closed 6 years ago
Are you saying that the on
listener is returning docs that shouldn't be returned? (I'm not 100% clear on what you're doing and what is expected... )
@MichaelSolati, yes. After changing query in updateCriteria nothing happens. key_exited
or key_enterd
isn't fired.
So nothing should/could/would happen. So key_exited
CANNOT be fired because we don't know what your query is. We can't see your query function, so we can't do a check/validate if the old enteries are still in the query (except for doing a basic distance check).
key_entered
shouldn't fire either, because if your location is the same all of the old docs that had fired that matched your query are still valid, so geofirestore won't fire an event.
If you're changing the query function it would be best to treat it as a new query and clear out your store of previous results.
@MichaelSolati then it doesn't make sense to have query as argument in updateCriteria since it can't be changed.
It'll just effect future changes to the entire query. I'm not saying it makes perfect sense, but it definitely requires a refactor. (Which there are a slew of changes I have in mind which I want to make in the near future)
Thanks for answer! This is very nice library covering Firestore`s flaw with missing native GeoQuery. Nice job!
Hello! Sorry for basic question, but can't get my code to work.
Problem: I have two ways of calling updateCriteria method, but only first one triggers updates:
Updating center and distance
Updating query
After calling onMapChange() or updateQuery() I expect documents to be filtered out, but in case of updateQuery() nothing really happens. I tried passing literally any query and by requesting
this.geoQuery._query.tosString()
query always changed, but documents are not changed.Am I doing this right?