Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested item data,errors out when dragging. #24

Closed
aydinfatih opened this issue Aug 26, 2018 · 2 comments
Closed

Nested item data,errors out when dragging. #24

aydinfatih opened this issue Aug 26, 2018 · 2 comments

Comments

@aydinfatih
Copy link

Error in render: "TypeError: Cannot read property 'title' of undefined"

<draggable-tree :data="pages" draggable>
       <div slot-scope="{data, store}">
                <strong v-if="data.children && data.children.length" @click="store.toggleOpen(data)"> 
             {{data.open ?
                    '-' : '+'}}&nbsp;</strong>
                <span>{{data[language].title}}</span>
       </div>
</draggable-tree>
@phphe
Copy link
Owner

phphe commented Aug 27, 2018

to

<draggable-tree :data="pages" draggable>
       <div slot-scope="{data, store}">
<template v-if="!data.isDragPlaceHolder">
                <strong v-if="data.children && data.children.length" @click="store.toggleOpen(data)"> 
             {{data.open ?
                    '-' : '+'}}&nbsp;</strong>
                <span>{{data[language].title}}</span>
</template>
       </div>
</draggable-tree>

@aydinfatih
Copy link
Author

thank you

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

No branches or pull requests

2 participants