react-admin-firebase
react-admin-firebase copied to clipboard
Display list very slow
I have a list with about 20k lines. To display this list, this take a very long time. Is there a solution to resolve this inconvenient ? Thanks
This is a common issue, try enabling LazyLoading via:
const dataProvider = FirebaseDataProvider(firebaseConfig, {
lazyLoading: {
enabled: true,
},
});
Related to #59
Thanks, I have tried it but when I want to do a filter, the values not already available are not founded. Is there a solution about filters with lazyLoading enabled ?
Is there a solution with the new "count" result announced last week at the Firebase Submit ?
I experienced the same problem with slow lists and I can't yet enable lazyLoading because of the problems with filters too. I used a permanent filter as a workaround. I added this to the List component:
filter={{ collectionQuery: c => c.where('orderDate', '>=', aWeekAgo).where('orderDate', '<=', today) }}
Thanks for your answer. Don't understand your query. Could you adding some details please ? What is orderDate ? Is it like CreatedAt ?
Yes, orderDate is like a CreateAt. The whole List component looks like this:
<List actions={<ListActions />} filters={orderFilter} filter={{ collectionQuery: c => c.where('orderDate', '>=', aWeekAgo).where('orderDate', '<=', today) }} sort={{ field: 'orderDate', order: 'DESC' }} {...props}>
Hope it helps.
Ok thanks. But with this filter, I have no result....