pouya-eghbali / meteor-autoform

Meteor AutoForm fork, maintained, with tons of performance issues fixed
MIT License
9 stars 1 forks source link

autoform is not reactively changing #1

Closed guncebektas closed 4 years ago

guncebektas commented 4 years ago

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')); }

pouya-eghbali commented 4 years ago

I will investigate this, it should re-render if the data is changed, so this is most probably a bug.

pouya-eghbali commented 4 years ago

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.

guncebektas commented 4 years ago

I'm using {{#autoForm}} other parts look the same. I'll try in a clean project.

guncebektas commented 4 years ago

@pouya-eghbali it's working on a new project. I'll try to reproduce it in it.

pouya-eghbali commented 4 years ago

Let me know what are the results, I'll also run a test with {{#autoForm}} tomorrow.