I have a custom component developed with Vue.js. The component is a wrapper that can dynamically create another component given parameters per parameter.
The problem I have is when using the v-model of that dynamic component and linking it to the model of the parent view, the value is not sent.
parent view
<component-wrapper v-model="wrapperValue" v-bind:childElement="{
elementTag: 'b-form-input',
childProps: {
attrs: {
id: 'foo'
},
}
}"/>
<p style="clear:both;">Wrapper value: {{wrapperValue}}</p>
component-wrapper.js
<script lang="ts">
import Vue from 'vue';
export default Vue.component('component-wrapper', {
render: function(createElement) {
return createElement(this.childElement.elementTag, this.childElement.childProps);
},
data() {
return {
};
},
mounted: function() {
},
props: {
childElement: Object,
},
methods: {
}
});
</script>