aboutsummaryrefslogtreecommitdiff
path: root/src/store/devices.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/devices.js')
-rw-r--r--src/store/devices.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/store/devices.js b/src/store/devices.js
index f2f6263b..130b11c8 100644
--- a/src/store/devices.js
+++ b/src/store/devices.js
@@ -15,14 +15,13 @@ const { reducer, actions } = createSlice({
update(state, action) {
action.payload.forEach((item) => state.items[item.id] = item);
},
- select(state, action) {
- state.selectedId = action.payload;
- },
selectId(state, action) {
+ state.selectTime = Date.now();
state.selectedId = action.payload;
state.selectedIds = state.selectedId ? [state.selectedId] : [];
},
selectIds(state, action) {
+ state.selectTime = Date.now();
state.selectedIds = action.payload;
[state.selectedId] = state.selectedIds;
},