Open thilankascentic opened 6 years ago
@thilankascentic
The value from the cell must be equal to the corresponding title in your list.
So, I couldn't manage to make it work with a column property of type Object.
Instead I had to create a new property of type String, in which I assigned my Object.id value. Then I need to retrieve corresponding title from the id.
In example :
daysOfTheWeekList: [{ value: 0, title: 'Monday' }, { value: 1, title: 'Tuesday' }]
...
my_day_value: {
title: 'Day',
editor: {
type: 'list',
config: {
list : this.daysOfTheWeekList
}
},
valuePrepareFunction: (cell) => {
return this.findDayNameById(cell);
}
},
...
Function findDayNameById returns the title from the given value into the daysOfTheWeekList list.
Related to : https://github.com/akveo/ng2-smart-table/issues/580 - Titles of dropdown cells https://github.com/akveo/ng2-smart-table/issues/10 - Input Select
Hello! did you solve this eventually?
hello, I am facing the same above issue. I went through the above posts but not able to figure out the exact solution for the problem. did you able to solve this problem??
Hi !,
Im my table, I have dropdown columns, when I click on edit link, cell value clearing, can anyone help me to figure this please?