Skip to content

Commit

Permalink
removed divider code and updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AyHaski committed Sep 9, 2020
1 parent 81c30eb commit 514d46a
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 49 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ Name | Type | Default | Description
value | Object | [] | items for treeview. `item-key`, `item-text`, `item-children` are not customizable currently. `value` can be like `{ id: 1, name: "test", children: []}` .
group | string | null | group name for vuedraggable. If this props not provided, drag and drop are enabled only in children.
expand-icon | string | 'mdi-menu-down' |mdi string for the expand icon.
show-divider | boolean | false |show a divider under each node.

### Events
Name | Value | Description
Expand Down
5 changes: 0 additions & 5 deletions src/DraggableTreeview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
:group="group"
:value="item"
:expand-icon="expandIcon"
:show-divider="showDivider"
@input="updateItem"
>
<template v-slot:prepend="{ item, open }">
Expand Down Expand Up @@ -53,10 +52,6 @@ export default Vue.extend({
expandIcon: {
type: String,
default: "mdi-menu-down"
},
showDivider: {
type: Boolean,
default: (): boolean => false
}
},
data() {
Expand Down
15 changes: 0 additions & 15 deletions src/DraggableTreeviewNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@
</div>
<slot name="append" v-bind="{ item: value }" />
</div>
<hr
v-if="showDivider"
role="separator"
aria-orientation="horizontal"
class="v-divider"
:class="{
'theme--dark': isDark,
'theme--light': !isDark
}"
/>
<div
v-if="open"
class="v-treeview-node__children v-treeview-node__children__draggable"
Expand All @@ -60,7 +50,6 @@
:value="child"
:level="level + 1"
:expand-icon="expandIcon"
:show-divider="showDivider"
@input="updateChildValue"
>
<template v-slot:prepend="{ item, open }">
Expand Down Expand Up @@ -114,10 +103,6 @@ export default Vue.extend({
expandIcon: {
type: String,
default: "mdi-menu-down"
},
showDivider: {
type: Boolean,
default: (): boolean => false
}
},
data() {
Expand Down
3 changes: 1 addition & 2 deletions test/DraggableTreeview.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("DraggableTreeview", () => {
});
});

test("renders correctly with divider and changed expand Icon", () => {
test("renders correctly with changed expand Icon", () => {
const wrapper = mount(DraggableTreeview, {
vuetify: new Vuetify({
mocks: {
Expand All @@ -63,7 +63,6 @@ describe("DraggableTreeview", () => {
]
}
],
showDivider: true,
expandIcon: "mdi-chevron-down"
}
});
Expand Down
28 changes: 2 additions & 26 deletions test/__snapshots__/DraggableTreeview.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ exports[`DraggableTreeview renders correctly 1`] = `
</div>
<!---->
<!---->
</div>
</div>
`;
Expand Down Expand Up @@ -59,8 +57,6 @@ exports[`DraggableTreeview renders correctly 2`] = `
</div>
<!---->
<div
class="v-treeview-node__children v-treeview-node__children__draggable"
>
Expand Down Expand Up @@ -91,16 +87,14 @@ exports[`DraggableTreeview renders correctly 2`] = `
</div>
<!---->
<!---->
</div>
</div>
</div>
</div>
</div>
`;

exports[`DraggableTreeview renders correctly with divider and changed expand Icon 1`] = `
exports[`DraggableTreeview renders correctly with changed expand Icon 1`] = `
<div
class="v-treeview v-treeview-draggable theme--light"
>
Expand All @@ -126,18 +120,12 @@ exports[`DraggableTreeview renders correctly with divider and changed expand Ico
</div>
<hr
aria-orientation="horizontal"
class="v-divider theme--light"
role="separator"
/>
<!---->
</div>
</div>
`;

exports[`DraggableTreeview renders correctly with divider and changed expand Icon 2`] = `
exports[`DraggableTreeview renders correctly with changed expand Icon 2`] = `
<div
class="v-treeview v-treeview-draggable theme--light"
>
Expand All @@ -163,12 +151,6 @@ exports[`DraggableTreeview renders correctly with divider and changed expand Ico
</div>
<hr
aria-orientation="horizontal"
class="v-divider theme--light"
role="separator"
/>
<div
class="v-treeview-node__children v-treeview-node__children__draggable"
>
Expand Down Expand Up @@ -198,12 +180,6 @@ exports[`DraggableTreeview renders correctly with divider and changed expand Ico
</div>
<hr
aria-orientation="horizontal"
class="v-divider theme--light"
role="separator"
/>
<!---->
</div>
</div>
Expand Down

0 comments on commit 514d46a

Please sign in to comment.