Skip to content

Passing Scoped Slot to MyVuetable in Template#56

Open
PejmanNik wants to merge 2 commits into
ratiw:masterfrom
PejmanNik:master
Open

Passing Scoped Slot to MyVuetable in Template#56
PejmanNik wants to merge 2 commits into
ratiw:masterfrom
PejmanNik:master

Conversation

@PejmanNik

Copy link
Copy Markdown

Hi
I think this way we can fix the problem you explained in lesson 17
Passing Scoped Slot to MyVuetable in Template by v-for on slotName in Object.keys($scopedSlots)
Thanks for your great Tutorial

Passing Scoped Slot to MyVuetable in Template
@PejmanNik PejmanNik changed the title Update MyVuetable.vue Passing Scoped Slot to MyVuetable in Template Jul 3, 2017
@ratiw

ratiw commented Jul 4, 2017

Copy link
Copy Markdown
Owner

@PejmanNik That is a really interesting way of passing the scoped slot. Thanks for sharing! :)

@PejmanNik

Copy link
Copy Markdown
Author

@ratiw Thank you :)

@ghost

ghost commented Dec 2, 2017

Copy link
Copy Markdown

With Vue 2.5 it's now the way to follow ... thanks
In this case we don't need anymore the CustomAction.vue component

using render function was interesting for better understanding , but should it be now deprecated ?

@ghost

ghost commented Dec 2, 2017

Copy link
Copy Markdown

to avoid warning binding :key should be added to a wrapper element

     <template :slot="slotName" slot-scope="props" v-for="(slotName, index) in  $scopedSlots?Object.keys($scopedSlots):null">
       <div :key="index">
          <slot :name="slotName" :row-data="props.rowData" :row-index="props.rowIndex" :row-field="props.rowField"></slot>
     </div> 
     </template>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants