geofirex icon indicating copy to clipboard operation
geofirex copied to clipboard

Returning DocumentReference will be great

Open kbala-ami opened this issue 6 years ago • 0 comments

https://github.com/codediodeio/geofirex/blob/8dc13bfbc73d9a4d652b215bf4182b41994bb414/src/query.ts#L159

@codediodeio, It would be really great if the result document returns ref(DocumentReference) instead of id

function snapToData(id = 'id') {
  return map((querySnapshot: fb.firestore.QuerySnapshot) =>
    querySnapshot.docs.map(v => {
      return {
       ref: v.ref, //lets return document.ref  ...(id ? { [id]: v.id } : null), 
        ...v.data()
      };
    })
  );
}

Thanks

kbala-ami avatar Nov 23 '19 23:11 kbala-ami