We've built an administration UI based on React Admin and in a couple of occasions we want to use multiple lists on a single screen for convenience. E.g. on a user detail view, we want to show the multiple addresses the user has on file, and the purchases the user has made. User, address and purchase are all "resources" in RA terminology.
It roughly looks like this:
/* file <...>/resources/users/UserShow.js */
import AddressList from '../addresses/AddressList';
import PurchaseList from '../purchases/PurchaseList';
const UserShow = ({ id, classes, translate, ...props }) => (
<Fragment>
<Show id={id} {...props}>
...render user details here...
</Show>
<AddressList {...props} basePath={'/addresses'} resource={'addresses'} filter={{ userId: id }} />
<PurchaseList {...props} basePath={'/purchases'} resource={'purchases'} filter={{ userId: id }} />
</Fragment>
);
Most of it seems to work nicely but the filters give us some headache. Everything around it seems to be built for exactly one filter at a time, without any means to customize (like e.g. specifying a property to use for the filter in the redux and react-router stores, instead of using a hardcoded one)
Has anyone ever made two filterable lists on the same screen work and has some more pointers?