Closed thearabbit closed 8 years ago
Please try version 0.2.1, I allowed to use the function in optionsMethodParams
Thanks for quickly reply.
I love this package, because I have many problem with select dropdown
that get data from the server.
Excuse me, could you solve issue #19
to use arrow key to select item list.
Now it work fine, but it don't reactive to change params to server when I change value of AutoForm.getFieldValue('dependField')
;
I'm working on a big refactoring this package - please few more days of patience :)
About AutoForm.getFieldValue('dependField');
I think you should create new ReactiveVar
for this and use Tracker.autorun
I waiting you... Could you example for reactive? My schema:
fieldA: {
type: String,
label: 'Field A',
autoform: {
type: 'universe-select',
afFieldInput: {
optionsMethod: 'getA'
}
}
}
.........
fieldBDependOnFieldA: {
type: String,
label: 'Field B Depend On Field A',
autoform: {
type: 'universe-select',
afFieldInput: {
optionsMethod: 'getBDependOnFieldA',
optionsMethodParams: function(){
var fieldA= AutoForm.getFieldValue('fieldA');
return {fieldA: fieldA};
}
}
}
}
I tried again, the value of fieldA
is reactive when it change, but the optionsMethodParams
don't pass the new value to server (don't reactive).
Please check it in the latest version 0.3.1
Great, Now I'm updating...
When passing the optionsMethodParams, how do I access that value within the server-side method?
Figured it out. Thanks.
I would to change the
options value
depend onother field
changed.So I need
optionsMethodParams
to support function callback? Please help me.