Passing the control, and field information along with the model while
rendering the Select control.pull/3/head
parent
aec96b4933
commit
9f8a46c820
|
@ -217,15 +217,15 @@
|
||||||
attributes: attributes,
|
attributes: attributes,
|
||||||
formatter: this.formatter
|
formatter: this.formatter
|
||||||
}),
|
}),
|
||||||
evalF = function(f, m) {
|
evalF = function(f, d, m) {
|
||||||
return (_.isFunction(f) ? !!f(m) : !!f);
|
return (_.isFunction(f) ? !!f.apply(d, m) : !!f);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Evaluate the disabled, visible, and required option
|
// Evaluate the disabled, visible, and required option
|
||||||
_.extend(data, {
|
_.extend(data, {
|
||||||
disabled: evalF(data.disabled, this.model),
|
disabled: evalF(data.disabled, data, this.model),
|
||||||
visible: evalF(data.visible, this.model),
|
visible: evalF(data.visible, data, this.model),
|
||||||
required: evalF(data.required, this.model)
|
required: evalF(data.required, data, this.model)
|
||||||
});
|
});
|
||||||
// Evaluation the options
|
// Evaluation the options
|
||||||
if (_.isFunction(data.options)) {
|
if (_.isFunction(data.options)) {
|
||||||
|
|
Loading…
Reference in New Issue