diff options
| author | taehoon <th.dev91@gmail.com> | 2019-02-25 04:51:23 -0500 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-02-28 12:41:20 -0500 |
| commit | 080786c9458ba8b9db1ea63732824a3e297e10dc (patch) | |
| tree | 0f25295769d0b1da4bafa70f3b56e571999a5c60 /src/hocs/with_load_more | |
| parent | cb383df517dc5cd5b4d90136b533977a33611b71 (diff) | |
Rewrite FollowList using hocs
Diffstat (limited to 'src/hocs/with_load_more')
| -rw-r--r-- | src/hocs/with_load_more/with_load_more.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hocs/with_load_more/with_load_more.js b/src/hocs/with_load_more/with_load_more.js index 7d53e7ac..b8246ec9 100644 --- a/src/hocs/with_load_more/with_load_more.js +++ b/src/hocs/with_load_more/with_load_more.js @@ -7,6 +7,7 @@ import './with_load_more.scss' const withLoadMore = ({ fetch, // function to fetch entries and return a promise select, // function to select data from store + destroy, // function called at "destroyed" lifecycle childPropName = 'entries', // name of the prop to be passed into the wrapped component additionalPropNames = [] // additional prop name list of the wrapper component }) => (WrappedComponent) => { @@ -58,6 +59,7 @@ const withLoadMore = ({ }, destroyed () { window.removeEventListener('scroll', this.scrollLoad) + destroy && destroy(this.$props, this.$store) }, methods: { fetchEntries () { |
