Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 332e039

Browse files
committed
Fixes issue with using custom resource list
``` withResourceList( 'users', { list: 'specialUsers' } ) ``` resourceList for such case returned users from regular list, not `specialUsers` list
1 parent 2331b9a commit 332e039

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎client/src/hocs/withResource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
getError,
1515
} from '../store/api';
1616

17-
const withResource = (resourceType, resourceMeta) => (WrappedComponent) => {
17+
const withResource = (resourceType, resourceMeta={}) => (WrappedComponent) => {
1818
const enhance = compose(
1919
withHandlers({
2020
onSubmit: props => (values, meta = {}) => {

‎client/src/hocs/withResourceList.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
getList,
1414
} from '../store/api';
1515

16-
const withResourceList = (resourceType, resourceMeta) => (WrappedComponent) => {
16+
const withResourceList = (resourceType, resourceMeta={}) => (WrappedComponent) => {
1717
const enhance = compose(
1818
withHandlers({
1919
onFilter: props => (filter) => {
@@ -51,7 +51,7 @@ const withResourceList = (resourceType, resourceMeta) => (WrappedComponent) => {
5151
);
5252

5353
const mapStateToProps = (state, props) => ({
54-
resourceList: getList(state, resourceType),
54+
resourceList: getList(state, resourceType,resourceMeta.list),
5555
});
5656

5757
const mapDispatchToProps = dispatch => ({

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /