Reputation: 13
Ive tried both
<List {...props}
filter={filter1 || filter2}
filters={<ListFilter />}
bulkActionButtons={<BulkActions canEdit={canEdit} />}
perPage={preferences.rowsPerPage}
pagination={<Pagination />} >
<ListDesktop canEdit={canEdit} />
</List>
and
<List {...props}
filter={filter1 %% filter2}
filters={<ListFilter />}
bulkActionButtons={<BulkActions canEdit={canEdit} />}
perPage={preferences.rowsPerPage}
pagination={<Pagination />} >
<ListDesktop canEdit={canEdit} />
</List>
Its very difficult to find any documentation on the filter property. Is there a way to accomplish or logic in react admin?
Upvotes: 0
Views: 90
Reputation: 67
Hard to tell without more context.
Anyway filter is a prop so I assume filter1 and filter2 are objects. Assuming that I think you have to join in one single object, e.g. :
when filter1={id:1} and filter2={id:2} then filter={{id:[1,2]}}.
Hope this solves it.
Upvotes: 1