Update hocs to pass parent-scope bindings to the wrapped component
This commit is contained in:
parent
52913d8f87
commit
8270274865
2 changed files with 33 additions and 20 deletions
|
@ -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']
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue