While I am updating a MongoDB model immediately upon keypress, it seems to lag behind due to the value being attached to that model. What would be the most effective way to update the model both on keypress and when refreshing the page so that the input remains populated? Could it be better to just populate the input once onRendered (ensuring that the value is not directly attached to the database object)?
<input type="text" id="name" value="{{getName}}" required autofocus>
Template.campaignEditDetails.events
"keyup input": (e, t)->
val = e.currentTarget.value
field = e.currentTarget.id
Meteor.call "upsertCampaignField", t.data.campaignId, field, val, t.data.appId
Could the reason for this issue be related to using meteor.call for the update instead of executing it directly on the client side (which is necessary because it's an upsert operation)?