this.typeParams = {
create: () => {
this.stateElem = document.createElement('input');
return this.stateElem;
},
destroy: () => {
this.stateObj.destroy();
},
read: () => {
return this.stateObj.value;
},
write: (args) => {
let dataIndex = this.typeColl.findIndex(e => e.input_type === args.rowData[args.column.filed]);
this.stateObj = new DropDownList({
dataSource: new DataManager(this.typeColl),
enabled: true,
value: args.rowData[args.column.field],
fields: { value: 'input_type', text: 'select_name' },
floatLabelType: 'Never',
placeholder: 'Select a type',
index: dataIndex
});
this.stateObj.appendTo(this.stateElem);
}
};
|