aboutsummaryrefslogtreecommitdiff
path: root/src/components/selectable_list/selectable_list.js
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-04-06 13:45:28 -0400
committertaehoon <th.dev91@gmail.com>2019-04-17 11:32:49 -0400
commitecff6acf2d651931e06eebfa8856d940aedb2bee (patch)
tree080100a22deecc56519ccf4a55180637fce0d965 /src/components/selectable_list/selectable_list.js
parent3f5e798de79b401945d2a0ac992ca5ee6115d79f (diff)
support indeterminate checkbox state
Diffstat (limited to 'src/components/selectable_list/selectable_list.js')
-rw-r--r--src/components/selectable_list/selectable_list.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/components/selectable_list/selectable_list.js b/src/components/selectable_list/selectable_list.js
index b60399ec..b8bd4f75 100644
--- a/src/components/selectable_list/selectable_list.js
+++ b/src/components/selectable_list/selectable_list.js
@@ -24,6 +24,12 @@ const SelectableList = {
computed: {
allSelected () {
return !this.items.find(item => !this.isSelected(item))
+ },
+ noneSelected () {
+ return !this.items.find(item => this.isSelected(item))
+ },
+ someSelected () {
+ return !this.allSelected && !this.noneSelected
}
},
methods: {