Skip to content

Commit

Permalink
Reset values to 1 if key type does not support multiple when adding a…
Browse files Browse the repository at this point in the history
… new key. #20
  • Loading branch information
ekvedaras committed Oct 20, 2021
1 parent 8e9834b commit 92c05df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redis-gui",
"version": "1.2.4",
"version": "1.2.5",
"private": true,
"description": "Graphical UI for managing Redis databases",
"author": {
Expand Down
7 changes: 7 additions & 0 deletions src/components/Modals/AddKeyModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ export default {
this[name] = value
})
},
watch: {
type(newType) {
if (!['list', 'set'].includes(newType)) {
this.values.splice(1, this.values.length - 1)
}
}
},
methods: {
hide () {
this.$emit('close')
Expand Down

0 comments on commit 92c05df

Please sign in to comment.