[Vuejs]-Passing the Div id to another vue component in laravel

0👍

the scope of this.$el.querySelector will be limited to only ChatComposer.vue hence child component can not able to access div of parent component #myDiv .

You can trigger event as below in ChatComposer

this.$emit('scroll');

In parent component write ScollToEnd method and use $ref to assign new height

<chat-composer v-bind:userid="userid" v-bind:chats="chats" v-bind:adminid="adminid" @scroll="ScollToEnd"></chat-composer>

..

Leave a comment