aboutsummaryrefslogtreecommitdiff
path: root/src/hocs/with_load_more
diff options
context:
space:
mode:
Diffstat (limited to 'src/hocs/with_load_more')
-rw-r--r--src/hocs/with_load_more/with_load_more.jsx (renamed from src/hocs/with_load_more/with_load_more.js)11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/hocs/with_load_more/with_load_more.js b/src/hocs/with_load_more/with_load_more.jsx
index 671b2b6f..6cd198ed 100644
--- a/src/hocs/with_load_more/with_load_more.js
+++ b/src/hocs/with_load_more/with_load_more.jsx
@@ -1,4 +1,5 @@
-import Vue from 'vue'
+// eslint-disable-next-line no-unused
+import { h } from 'vue'
import isEmpty from 'lodash/isEmpty'
import { getComponentProps } from '../../services/component_utils/component_utils'
import './with_load_more.scss'
@@ -23,7 +24,7 @@ const withLoadMore = ({
const originalProps = Object.keys(getComponentProps(WrappedComponent))
const props = originalProps.filter(v => v !== childPropName).concat(additionalPropNames)
- return Vue.component('withLoadMore', {
+ return {
props,
data () {
return {
@@ -39,7 +40,7 @@ const withLoadMore = ({
this.fetchEntries()
}
},
- destroyed () {
+ unmounted () {
window.removeEventListener('scroll', this.scrollLoad)
destroy && destroy(this.$props, this.$store)
},
@@ -79,7 +80,7 @@ const withLoadMore = ({
}
}
},
- render (h) {
+ render () {
const props = {
props: {
...this.$props,
@@ -106,7 +107,7 @@ const withLoadMore = ({
</div>
)
}
- })
+ }
}
export default withLoadMore