Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Commit

Permalink
refactor(demo): Remove not needed calls in InputChipsDemo
Browse files Browse the repository at this point in the history
  • Loading branch information
matsp committed Jul 23, 2018
1 parent e10516a commit 959e1e6
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions docs/.vuepress/components/ChipsInputDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
input>
<m-chip
v-if="!edit"
@click.native="toggleEdit">
@click.native="edit=!edit">
<m-icon
v-if="checkboxProps[0].value"
icon="location_city"
Expand All @@ -17,7 +17,7 @@
id="input-chip"
v-if="edit"
v-model="city"
@keyup.enter.native="toggleEdit"/>
@keyup.enter.native="edit=!edit"/>
</ComponentSection>
<ComponentProps
:radioProps="radioProps"
Expand All @@ -38,18 +38,6 @@ export default {
city: 'Salzburg',
edit: false
}
},
methods: {
toggleEdit () {
this.edit = !this.edit
if (this.edit) {
this.$nextTick().then(this.selectText).catch(e => console.log(e))
}
},
selectText () {
let inputs = document.getElementById('input-chip').getElementsByTagName('input')
inputs[0].select()
}
}
}
</script>

0 comments on commit 959e1e6

Please sign in to comment.