Rename some options and add comments to HOCs
This commit is contained in:
parent
339373b495
commit
6d4d705c51
4 changed files with 20 additions and 9 deletions
|
@ -4,7 +4,10 @@ import map from 'lodash/map'
|
|||
const defaultEntryPropsGetter = entry => ({ entry })
|
||||
const defaultKeyGetter = entry => entry.id
|
||||
|
||||
const withList = ({ getEntryProps = defaultEntryPropsGetter, getKey = defaultKeyGetter }) => (ItemComponent) => (
|
||||
const withList = ({
|
||||
getEntryProps = defaultEntryPropsGetter, // function to accept entry and index values and return props to be passed into the item component
|
||||
getKey = defaultKeyGetter // funciton to accept entry and index values and return key prop value
|
||||
}) => (ItemComponent) => (
|
||||
Vue.component('withList', {
|
||||
render (createElement) {
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue