diff options
Diffstat (limited to 'modern/src/store/devices.js')
-rw-r--r-- | modern/src/store/devices.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modern/src/store/devices.js b/modern/src/store/devices.js index 3d7be3e6..66c1607f 100644 --- a/modern/src/store/devices.js +++ b/modern/src/store/devices.js @@ -7,6 +7,10 @@ const { reducer, actions } = createSlice({ selectedId: null }, reducers: { + refresh(state, action) { + state.items = {}; + action.payload.forEach(item => state.items[item['id']] = item); + }, update(state, action) { action.payload.forEach(item => state.items[item['id']] = item); }, |