From ecff6acf2d651931e06eebfa8856d940aedb2bee Mon Sep 17 00:00:00 2001
From: taehoon
Date: Sat, 6 Apr 2019 13:45:28 -0400
Subject: support indeterminate checkbox state
---
src/components/selectable_list/selectable_list.js | 6 ++++++
src/components/selectable_list/selectable_list.vue | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
(limited to 'src/components/selectable_list')
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: {
diff --git a/src/components/selectable_list/selectable_list.vue b/src/components/selectable_list/selectable_list.vue
index 292704c4..5b8693c4 100644
--- a/src/components/selectable_list/selectable_list.vue
+++ b/src/components/selectable_list/selectable_list.vue
@@ -2,7 +2,7 @@