You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the component is rendered at the end of a container, the opening dropdown is clipped by the container. Is it possible to teleport the dropdown to another compnent to fix this issue? Something like this
<container1>
<container2>
<vue-tel-inputteleportDropdownTo="#target"/>
</container2>
<divid="#target"/> //The dropdown is rendered here
</container1>
The text was updated successfully, but these errors were encountered:
yukosgiti
changed the title
Is it possible to teleport the dropdown to another compnent?
Is it possible to teleport the dropdown to another component?
Jul 25, 2022
methods: {
vueTelInputDropDownOpen ($refs) {
/* By the way, need the timeout because, the event open of the dropdown is before the ul is created, so the ul is not available, need to wait a frame, hence the timeout, to catch the right reference "$ref" to the input*/
setTimeout(() => {
let listElement = $refs.list
let targetPosition=$refs.list.parentElement.closest('li') //modify as needed
//detach and re-attach to another position.
let detached= listElement.parentNode.removeChild(listElement);
targetPosition.appendChild(detached);
})
},
When the component is rendered at the end of a container, the opening dropdown is clipped by the container. Is it possible to teleport the dropdown to another compnent to fix this issue? Something like this
The text was updated successfully, but these errors were encountered: