- feat: Highlight inactive accounts in data-table.

- feat: Separate accounts list and table order.
This commit is contained in:
Ahmed Bouhuolia
2020-07-04 15:30:24 +02:00
parent 273834b13e
commit 3fc390652d
13 changed files with 116 additions and 49 deletions

View File

@@ -6,6 +6,9 @@ const accountsDataSelector = (state) => state.accounts.items;
const accountsCurrentViewSelector = (state) => state.accounts.currentViewId;
const accountIdPropSelector = (state, props) => props.accountId;
const accountsListSelector = state => state.accounts.list;
export const getAccountsItems = createSelector(
accountsViewsSelector,
accountsDataSelector,
@@ -19,6 +22,14 @@ export const getAccountsItems = createSelector(
},
);
export const getAccountsListFactory = () => createSelector(
accountsListSelector,
accountsDataSelector,
(accounts, accountsItems) => {
return pickItemsFromIds(accountsItems, accounts);
},
)
export const getAccountById = createSelector(
accountsDataSelector,
accountIdPropSelector,