2
0
mirror of https://github.com/frappe/books.git synced 2025-01-23 07:08:36 +00:00

table control

This commit is contained in:
Rushabh Mehta 2018-02-06 22:47:34 +05:30
parent 4af2b1394d
commit 78799cb8d9

View File

@ -36,18 +36,18 @@ class TableControl extends BaseControl {
field.only_input = true; field.only_input = true;
const control = controls.make_control({field: field, parent: parent}); const control = controls.make_control({field: field, parent: parent});
return { return {
initValue: (value, rowIndex, column) => { initValue: (value, rowIndex, column) => {
control.parent_control = this; control.parent_control = this;
control.doc = this.doc[this.fieldname][rowIndex]; control.doc = this.doc[this.fieldname][rowIndex];
control.set_focus(); control.set_focus();
return control.set_input_value(value);
},
setValue: (value, rowIndex, column) => {
return control.set_input_value(value); return control.set_input_value(value);
}, },
getValue: () => { setValue: (value, rowIndex, column) => {
return control.get_input_value(); return control.set_input_value(value);
},
getValue: () => {
return control.get_input_value();
} }
} }
} }