Closed guncebektas closed 4 years ago
I will investigate this, it should re-render if the data is changed, so this is most probably a bug.
Ok so, I have this form:
{{> quickForm collection=getCollection doc=getDoc id="editStoreForm" type=getFormType}}
and in my helpers I have:
getDoc: function () {
const storeId = Session.get('storeId')
return Stores.findOne({ _id: storeId });
},
And when I do
Session.set("storeId", "the-id-of-the-store")
in console, I get the desired result and AutoForm gets re-rendered with the new values.
Can you tell me how you're doing this exactly? I couldn't reproduce this.
I'm using {{#autoForm}} other parts look the same. I'll try in a clean project.
@pouya-eghbali it's working on a new project. I'll try to reproduce it in it.
Let me know what are the results, I'll also run a test with {{#autoForm}} tomorrow.
If I change the data of autoform like this in a modal on the same page. It no longer re-render itself. I guess you have changed re-rendering for performance issue but this change is really annoying :(
Is it a bug you want to solve or can you share which part of the code is related so I might revert it for myself?
Thanks.
data() { return Collection.findOne(session('_id')); }