is there a way to scroll the list at the bottom right from the opening?
or, even better, in a particular item?
thank you
|
<div class="col-lg-6">
<ejs-listview enable="true" id="listview" dataSource="ViewBag.dataSource" height="300px" actionComplete="onComplete">
</ejs-listview>
</div>
<script>
function onComplete(args) {
document.querySelector('[data-uid="' + args.data[args.data.length - 1].id + '"]').scrollIntoView();
// move the scroller to last item during initial rendering
}
</script> |
I have a template like your chat example.
I have data-uid with random values like data-uid = "3de6".
how can i solve?
i resolve like this
i added an id in the div setting
<div class='settings' id="datauid${Idnota}">
.....
.....
<div/>
then, i call
document.querySelector('[id=datauid' + args.data[args.data.length - 1].Idnota + ']').scrollIntoView();
it seem work fine.
it's good idea?