Git Product home page Git Product logo

Comments (5)

suusan2go avatar suusan2go commented on May 14, 2024 1

@Steveiwonder Thank you for your detailed report. I'll fix this soon.

from vuetify-draggable-treeview.

suusan2go avatar suusan2go commented on May 14, 2024

Label slot for children nodes seems to work well in the demo app.

<template v-slot:label="{ item }">
<span class="primary--text">{{ item.name }}</span>
</template>

Can you give me some example code or repository to reproduce your issue?

from vuetify-draggable-treeview.

hossein-git avatar hossein-git commented on May 14, 2024

Hi;
i have same issue ,
in demo ,label slot for children node does not work too.
child-node

from vuetify-draggable-treeview.

Steveiwonder avatar Steveiwonder commented on May 14, 2024

I also have this same issue.

 <VuetifyDraggableTreeview v-model="items">
     <template v-slot:label="{item}">{{item.name}} [TEST]</template>
</VuetifyDraggableTreeview>

All top level elements have [TEST] appended, but any child elements do not

EDIT:

After looking at the code
https://github.com/suusan2go/vuetify-draggable-treeview/blob/master/src/DraggableTreeviewNode.vue

Child elements don't support label slot?

      <draggable
        :group="group"
        :value="value.children"
        ghost-class="ghost"
        @input="updateValue"
      >
        <treeview-node
          v-for="child in value.children"
          :key="child.id"
          :group="group"
          :value="child"
          :level="level + 1"
          @input="updateChildValue"
        >
          <template v-slot:prepend="{ item, open }">
            <slot name="prepend" v-bind="{ item, open }" />
          </template>
          <template v-slot:append="{ item }">
            <slot name="append" v-bind="{ item }" />
          </template>
        </treeview-node>
      </draggable>

Should be

      <draggable :group="group" :value="value.children" ghost-class="ghost" @input="updateValue">
        <treeview-node
          v-for="child in value.children"
          :key="child.id"
          :group="group"
          :value="child"
          :level="level + 1"
          @input="updateChildValue"
        >
          <template v-slot:prepend="{ item, open }">
            <slot name="prepend" v-bind="{ item, open }" />
          </template>
          <template v-slot:label="{ item, open }">
            <slot name="label" v-bind="{ item, open }"></slot>
          </template>
          <template v-slot:append="{ item }">
            <slot name="append" v-bind="{ item }" />
          </template>
        </treeview-node>
      </draggable>

from vuetify-draggable-treeview.

suusan2go avatar suusan2go commented on May 14, 2024

this has been fixed and released as version 0.0.5. Thank you for your report 🍻

from vuetify-draggable-treeview.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.