Skip to content

Commit 9fa795e

Browse files
committed
fix(CellProperty): Alert user if invalid input
1 parent 28a15c9 commit 9fa795e

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/components/properties/CellProperty/InputCell/script.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,16 @@ export default {
2727
return {
2828
editing: false,
2929
valueRep: this.value,
30+
error: false,
3031
};
3132
},
3233
methods: {
3334
onChange(value) {
3435
this.editing = true;
3536

3637
const isValid = Validate[this.type](value);
38+
this.error = !isValid;
39+
3740
if (!this.noEmpty && !value && !isValid) {
3841
this.$emit('input', undefined);
3942
} else if (isValid) {

src/components/properties/CellProperty/InputCell/template.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
:label="label"
33
:value="editing ? valueRep : value"
44
:readonly="domain && domain.readOnly"
5+
:error="error"
56
@input="onChange"
67
@blur="editing = false"
78
/>

0 commit comments

Comments
 (0)