vazco / meteor-universe-autoform-select

Meteor universe autoform select
MIT License
16 stars 10 forks source link

problem with dependant drop down list? #38

Closed thearabbit closed 8 years ago

thearabbit commented 8 years ago

I use dependant drop down list like this

'parent': {
  label: 'Parent',
  type: String,
  autoform: {
    ...............
    options: function() {
      return Parent.find({})....; // Parent "A"
    }
  }
},
'child': {
  label: 'Child',
  type: String,
  autoform: {
    ...........
    options: function() {
      var parent = AutoForm.getFieldValue('parent');
      return Client.find({parentId: parent})..........; // Child of "A": [Child 1, Child 2,Child 3]
    }
  }
}

It work fine on insert form.

It mean that when I change to parent "A", it get child [1, 2, 3].

But it don't work on update form. It mean that when I change to parent "A", it can't get child [1, 2, 3]. Please help me.

thearabbit commented 8 years ago

Now, it work fine.