How can I get both text and value of lookup column from editable material-table? Lookup gets only value of selected item. For example;
{ "0":"Istanbul", "2":"Ankara", "3":"Izmir" }
If I select "Istanbul" on lookup then I get 0 value. But I need both 0 and Istanbul.
This is my row value when adding a new row.
[{
"txtIsinAdi":"İş 1",
"lstIsinSinifi":"0"
},
{
"txtIsinAdi":"İş 2",
"lstIsinSinifi":"1"
}]
And this is my row added code :
onRowAdd: newData =>
new Promise((resolve, reject) => {
if(this.props.datafield.IsReadOnly === false)
{
setTimeout(() => {
{
const data = this.state.data;
data.push(newData);
this.setState({ data }, () => resolve());
}
resolve()
}, 1000)
}
else
{
this.messageHelper.showWarningMessage("Bu tabloya kayıt ekleme yetkiniz yok.");
reject();
}
})
}}