Skip to content

Commit

Permalink
style(VTreeview): alphabetize props
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Henry authored and MajesticPotatoe committed Jul 3, 2019
1 parent abcc3fa commit 5a70900
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
16 changes: 8 additions & 8 deletions packages/vuetify/src/components/VTreeview/VTreeview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ export default mixins(
default: () => ([]),
} as PropValidator<NodeArray>,
dense: Boolean,
filter: Function as PropValidator<FilterTreeItemFunction>,
hoverable: Boolean,
items: {
type: Array,
default: () => ([]),
} as PropValidator<any[]>,
hoverable: Boolean,
multipleActive: Boolean,
open: {
type: Array,
Expand All @@ -74,25 +75,24 @@ export default mixins(
type: Boolean,
default: false, // TODO: Should be true in next major
},
value: {
type: Array,
default: () => ([]),
} as PropValidator<NodeArray>,
search: String,
filter: Function as PropValidator<FilterTreeItemFunction>,
selectionType: {
type: String,
default: 'leaf',
validator: (v: string) => ['leaf', 'independent'].includes(v),
} as PropValidator<'leaf' | 'independent'>,
value: {
type: Array,
default: () => ([]),
} as PropValidator<NodeArray>,
...VTreeviewNodeProps,
},

data: () => ({
nodes: {} as Record<string | number, NodeState>,
selectedCache: new Set() as NodeCache,
activeCache: new Set() as NodeCache,
nodes: {} as Record<string | number, NodeState>,
openCache: new Set() as NodeCache,
selectedCache: new Set() as NodeCache,
}),

computed: {
Expand Down
50 changes: 25 additions & 25 deletions packages/vuetify/src/components/VTreeview/VTreeviewNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,21 @@ export const VTreeviewNodeProps = {
type: String,
default: 'v-treeview-node--active',
},
selectable: Boolean,
color: {
type: String,
default: 'primary',
},
selectedColor: {
expandIcon: {
type: String,
default: 'accent',
default: '$vuetify.icons.subgroup',
},
indeterminateIcon: {
type: String,
default: '$vuetify.icons.checkboxIndeterminate',
},
onIcon: {
type: String,
default: '$vuetify.icons.checkboxOn',
},
offIcon: {
type: String,
default: '$vuetify.icons.checkboxOff',
},
expandIcon: {
type: String,
default: '$vuetify.icons.subgroup',
},
loadingIcon: {
itemChildren: {
type: String,
default: '$vuetify.icons.loading',
default: 'children',
},
itemDisabled: {
type: String,
Expand All @@ -74,15 +61,28 @@ export const VTreeviewNodeProps = {
type: String,
default: 'name',
},
itemChildren: {
loadChildren: Function as PropValidator<(item: any) => Promise<void>>,
loadingIcon: {
type: String,
default: 'children',
default: '$vuetify.icons.loading',
},
offIcon: {
type: String,
default: '$vuetify.icons.checkboxOff',
},
onIcon: {
type: String,
default: '$vuetify.icons.checkboxOn',
},
loadChildren: Function as PropValidator<(item: any) => Promise<void>>,
openOnClick: Boolean,
transition: Boolean,
rounded: Boolean,
selectable: Boolean,
selectedColor: {
type: String,
default: 'accent',
},
shaped: Boolean,
transition: Boolean,
}

/* @vue/component */
Expand All @@ -104,12 +104,12 @@ export default baseMixins.extend<options>().extend({
},

data: () => ({
isOpen: false, // Node is open/expanded
isSelected: false, // Node is selected (checkbox)
isIndeterminate: false, // Node has at least one selected child
hasLoaded: false,
isActive: false, // Node is selected (row)
isIndeterminate: false, // Node has at least one selected child
isLoading: false,
hasLoaded: false,
isOpen: false, // Node is open/expanded
isSelected: false, // Node is selected (checkbox)
}),

computed: {
Expand Down

0 comments on commit 5a70900

Please sign in to comment.