Skip to content

Commit

Permalink
Merge pull request #64 from bnmajor/fix-input-help
Browse files Browse the repository at this point in the history
Display help for text input
  • Loading branch information
jourdain authored Feb 1, 2021
2 parents c115d6b + 757063d commit 7c31f66
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/properties/CellProperty/InputCell/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export default {
},
},
methods: {
inputFocused() {
this.$emit('focused');
},
inputBlurred() {
this.$emit('blurred');
},
onChange(value) {
this.editing = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
:readonly="domain && domain.readOnly"
:error="error"
@input="onChange"
@blur="editing = false"
@blur="inputBlurred()"
@focus="inputFocused()"
/>
2 changes: 2 additions & 0 deletions src/components/properties/CellProperty/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
:domain="prop.ui && prop.ui.domain"
:type="prop.ui && prop.ui.type"
@input="onChange(arguments[0], i-1)"
v-on:focused="help = true"
v-on:blurred="editing = help = false"
/>
</v-flex>
<v-flex
Expand Down

0 comments on commit 7c31f66

Please sign in to comment.