@@ -48,7 +48,6 @@ export default function DBInput(props: DBInputProps) {
48
48
_id : DEFAULT_ID ,
49
49
_isValid : undefined ,
50
50
_dataListId : DEFAULT_ID ,
51
- _value : '' ,
52
51
iconVisible : ( icon ?: string ) => {
53
52
return Boolean ( icon && icon !== '_' && icon !== 'none' ) ;
54
53
} ,
@@ -68,15 +67,15 @@ export default function DBInput(props: DBInputProps) {
68
67
props . change ( event ) ;
69
68
}
70
69
71
- // using controlled components for react forces us to using state for value
72
- state . _value = event . target . value ;
73
-
74
70
if ( event . target ?. validity ?. valid != state . _isValid ) {
75
71
state . _isValid = event . target ?. validity ?. valid ;
76
72
if ( props . validityChange ) {
77
73
props . validityChange ( ! ! event . target ?. validity ?. valid ) ;
78
74
}
79
75
}
76
+
77
+ // TODO: Replace this with the solution out of https://github.com/BuilderIO/mitosis/issues/833 after this has been "solved"
78
+ // VUE:this.$emit("update:value", event.target.value);
80
79
} ,
81
80
handleBlur : ( event : any ) => {
82
81
if ( props . onBlur ) {
@@ -107,10 +106,6 @@ export default function DBInput(props: DBInputProps) {
107
106
? props . dataListId
108
107
: `datalist-${ state . _id } ` ;
109
108
110
- if ( props . value ) {
111
- state . _value = props . value ;
112
- }
113
-
114
109
if ( props . stylePath ) {
115
110
state . stylePath = props . stylePath ;
116
111
}
@@ -137,7 +132,7 @@ export default function DBInput(props: DBInputProps) {
137
132
disabled = { props . disabled }
138
133
required = { props . required }
139
134
defaultValue = { props . defaultValue }
140
- value = { state . _value }
135
+ value = { props . value }
141
136
aria-invalid = { props . invalid }
142
137
maxLength = { props . maxLength }
143
138
minLength = { props . minLength }
0 commit comments