So I am sending data out to a chatbot api, and when the data is returned I add it to a datastore. Then the data is shown on the page in a repeat. This all works as it should. I just want to smooth scroll to the most recent id in the datastore. Not sure what I’m doing wrong I think I have it close though….
Here is the form element:
<form id="formAskQuestion" is="dmx-serverconnect-form" method="post" action="dmxConnect/api/Chatbot/trainingQry.asp" dmx-on:success="datastoreChatbot.insert({chattext: formAskQuestion.data.apiGetAnswer.data.text});formAskQuestion.reset();scroll1.goto('#repeat_item_'+datastore.data.max('$id'))" dmx-on:error="notifies1.warning('There was an error submittting the request.')">
Here is the repeat region:
<div dmx-repeat:repeat1="datastoreChatbot.data">
<row>
<div class="col border rounded border-dark mb-2 pt-2 pb-2" dmx-bind:id="'repeat_item_'+$id">
<p dmx-text="chattext"></p>
</div>
</row>
</div>
And here is my data store data:
