@@ -49,7 +49,6 @@ export default function DBInput(props: DBInputProps) {
4949 _id : DEFAULT_ID ,
5050 _isValid : undefined ,
5151 _dataListId : DEFAULT_ID ,
52- _value : '' ,
5352 iconVisible : ( icon ?: string ) => {
5453 return Boolean ( icon && icon !== '_' && icon !== 'none' ) ;
5554 } ,
@@ -69,15 +68,15 @@ export default function DBInput(props: DBInputProps) {
6968 props . change ( event ) ;
7069 }
7170
72- // using controlled components for react forces us to using state for value
73- state . _value = event . target . value ;
74-
7571 if ( event . target ?. validity ?. valid != state . _isValid ) {
7672 state . _isValid = event . target ?. validity ?. valid ;
7773 if ( props . validityChange ) {
7874 props . validityChange ( ! ! event . target ?. validity ?. valid ) ;
7975 }
8076 }
77+
78+ // TODO: Replace this with the solution out of https://github.com/BuilderIO/mitosis/issues/833 after this has been "solved"
79+ // VUE:this.$emit("update:value", event.target.value);
8180 } ,
8281 handleBlur : ( event : any ) => {
8382 if ( props . onBlur ) {
@@ -108,10 +107,6 @@ export default function DBInput(props: DBInputProps) {
108107 ? props . dataListId
109108 : `datalist-${ state . _id } ` ;
110109
111- if ( props . value ) {
112- state . _value = props . value ;
113- }
114-
115110 if ( props . stylePath ) {
116111 state . stylePath = props . stylePath ;
117112 }
@@ -138,7 +133,7 @@ export default function DBInput(props: DBInputProps) {
138133 disabled = { props . disabled }
139134 required = { props . required }
140135 defaultValue = { props . defaultValue }
141- value = { state . _value }
136+ value = { props . value }
142137 aria-invalid = { props . invalid }
143138 maxLength = { props . maxLength }
144139 minLength = { props . minLength }
0 commit comments