react-admin-firebase icon indicating copy to clipboard operation
react-admin-firebase copied to clipboard

Add support for use ReferenceManyField

Open gespispace opened this issue 5 years ago • 1 comments

I try use react-admin-firebase(r a f) and I have data structure how to example in react-admin.

For instance, if a user has many books and the books resource exposes a user_id field, <ReferenceManyField> can fetch all the books authored by a given user.

But r a f get all collection books and filtering. I think apiGetManyReference should create query and if pass filter object in <ReferenceManyField>, this query should create with where functions. This query be like that

for (const nameField in filter) {
  query.where(nameField, '==', filter[nameField]);
}

What you think about this?

gespispace avatar Aug 05 '20 18:08 gespispace

Hi @gespispace, Apologies for the late response, yeah that should be possible, would you be able to create an example project for us to look at, so we can understand it a bit better? Cheers, Ben

benwinding avatar Nov 21 '20 08:11 benwinding