From 8680046c4e59e2296de6add1237f59745aa49e03 Mon Sep 17 00:00:00 2001 From: taehoon Date: Thu, 14 Feb 2019 03:12:52 -0500 Subject: [PATCH] Pass down slots into wrapped components --- src/hocs/with_load_more/with_load_more.js | 8 +++- .../with_subscription/with_subscription.js | 46 ++++++++++++------- 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/src/hocs/with_load_more/with_load_more.js b/src/hocs/with_load_more/with_load_more.js index 459e026c..e9265d2a 100644 --- a/src/hocs/with_load_more/with_load_more.js +++ b/src/hocs/with_load_more/with_load_more.js @@ -18,11 +18,15 @@ const withLoadMore = ({ ...this.$props, [childPropName]: this.entries }, - on: this.$listeners + on: this.$listeners, + scopedSlots: this.$scopedSlots } + const children = Object.keys(this.$slots).map(slot => createElement('template', { slot }, this.$slots[slot])) return (
- + + {children} +