Comments (2)
Thanks. Now it works.
from bosket.
@m-mazeev Hi!
You are missing some props here. Try this:
<template>
<div id="app">
<TreeView
:model="model"
category="children"
:selection="selection"
:onSelect="onSelect"
:display="display"
/>
</div>
</template>
<script>
import { TreeView } from "@bosket/vue"
import { string } from "@bosket/tools"
export default {
name: 'test-bosket',
components: {
"TreeView": TreeView
},
methods: {
onSelect(newSelection) {
this.selection = newSelection
},
display(item) {
return item.label
}
},
data: function() {
return {
selection: [],
category: "children",
model: [{
label: "Animals",
children: [{
label: "Mammals",
children: [
{ label: "Tiger" },
{ label: "Platypus" },
{ label: "Bear" }
]
}, {
label: "Reptiles",
children: [
{ label: "Turtle" },
{ label: "Crocodile" }
]
}]
}]
}
}
}
</script>
<style>
/* CSS */
</style>
from bosket.
Related Issues (20)
- Custom Input field for search HOT 3
- Selecting a node programmatically HOT 1
- Drag on same level HOT 2
- event.dataTransfer undefined during drop event HOT 1
- No seperate classes on leaf nodes vs parent nodes HOT 1
- dragging with handle HOT 1
- Drag and Drop inbetween nodes (re-order nodes) HOT 2
- items dragged off the canvas disappear HOT 1
- Model rebind causes opened nodes to collapse
- Drag and Drop not working on IE 11 HOT 2
- build not working on windows HOT 1
- How to add custom html?
- Edit tree node contents
- Multiselect with selected nodes always open (vue) HOT 2
- Unfold on select but don't fold back when deselecting HOT 1
- Help with the demo HOT 5
- Display method rendered as string not as html HOT 4
- Typescript support?
- bosket + redux tree not call display() props for nested node
- Issue building Bosket/vue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bosket.