aboutsummaryrefslogtreecommitdiff
path: root/src/hocs/with_list/with_list.js
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-02-13 20:59:26 -0500
committertaehoon <th.dev91@gmail.com>2019-02-20 13:30:30 -0500
commit82702748653c7630e4f337433d47863f52c57ee4 (patch)
tree9aac0a471bd316d8fcecf2862d5950bc5f48a96e /src/hocs/with_list/with_list.js
parent52913d8f873dd6994988d6a928cca007a0effeaf (diff)
Update hocs to pass parent-scope bindings to the wrapped component
Diffstat (limited to 'src/hocs/with_list/with_list.js')
-rw-r--r--src/hocs/with_list/with_list.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/hocs/with_list/with_list.js b/src/hocs/with_list/with_list.js
index 21aa288b..5ec37a2b 100644
--- a/src/hocs/with_list/with_list.js
+++ b/src/hocs/with_list/with_list.js
@@ -12,15 +12,18 @@ const withList = (Component, getEntryProps = defaultEntryPropsGetter, getKey = d
{map(this.entries, (entry, index) => {
const props = {
key: getKey(entry, index),
- ...this.$props.entryProps,
- ...getEntryProps(entry, index)
+ props: {
+ ...this.$props.entryProps,
+ ...getEntryProps(entry, index)
+ },
+ on: this.$props.entryListeners
}
- return <Component {...{ attrs: props }} />
+ return <Component {...props} />
})}
</div>
)
},
- props: ['entries', 'entryProps']
+ props: ['entries', 'entryProps', 'entryListeners']
})
}