diff options
| author | Henry Jameson <me@hjkos.com> | 2019-04-27 12:26:17 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-04-27 12:26:17 +0300 |
| commit | e0247e21f6fad72481d8f04271d3a15e0d827acc (patch) | |
| tree | acc8a11074865a9cbdc50e9b52da918c48f7235e /src/hocs/with_list/with_list.js | |
| parent | 2b5cf61a8f9a84467495721f170df7ae1288959b (diff) | |
| parent | 9e2fa50b74eb83e3c3eadb9a68d24ddaa1d9da48 (diff) | |
Merge remote-tracking branch 'upstream/develop' into webpack-4-dart-sass
* upstream/develop: (126 commits)
entity normalizer: hook up in_reply_to_account_acct
add BBCode strings
fix follow button not updating bug in follow-card
refer searched user objects from the global user rep
set max-width of textarea in settings page
Remove space in the timeline setting copy
user_card.vue: Fix .emoji to apply to img
Update oc.json
Update oc.json
Update oc.json
Update oc.json
replace pencil with wrench icon
rebuild fontello with wrench icon added
fetch all friends using pagination
stop fetching user relationship when user is unauthorized
Revert "recover border between basic-user-card using list component"
remove extra spacing
code readability
fix typos
clean up
...
Diffstat (limited to 'src/hocs/with_list/with_list.js')
| -rw-r--r-- | src/hocs/with_list/with_list.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/hocs/with_list/with_list.js b/src/hocs/with_list/with_list.js deleted file mode 100644 index 896f8fc8..00000000 --- a/src/hocs/with_list/with_list.js +++ /dev/null @@ -1,40 +0,0 @@ -import Vue from 'vue' -import map from 'lodash/map' -import isEmpty from 'lodash/isEmpty' -import './with_list.scss' - -const defaultEntryPropsGetter = entry => ({ entry }) -const defaultKeyGetter = entry => entry.id - -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', { - props: [ - 'entries', // array of entry - 'entryProps', // additional props to be passed into each entry - 'entryListeners' // additional event listeners to be passed into each entry - ], - render (createElement) { - return ( - <div class="with-list"> - {map(this.entries, (entry, index) => { - const props = { - key: getKey(entry, index), - props: { - ...this.$props.entryProps, - ...getEntryProps(entry, index) - }, - on: this.$props.entryListeners - } - return <ItemComponent {...props} /> - })} - {isEmpty(this.entries) && this.$slots.empty && <div class="with-list-empty-content faint">{this.$slots.empty}</div>} - </div> - ) - } - }) -) - -export default withList |
