-
Notifications
You must be signed in to change notification settings - Fork 430
Closed
Description
Hi ,
I am trying the drop down cell editor, giving different Label and Value. but I see the value is displayed on selection and not the Label.
How i can show selected Label rather than selected Value. Am i missing something here?
render(){
const stocks=[
{id:1,name:'Books',owner:'Books',type:'E'},
{id:2,name:'Books',owner:'Books',type:'E'},
{id:3,name:'Books',owner:'Books',type:'E'},
{id:4,name:'Books',owner:'Books',type:'E'},
]
const columns = [{
dataField: 'id',
text: 'Job ID'
}, {
dataField: 'name',
text: 'Job Name'
}, {
dataField: 'owner',
text: 'Job Owner'
}, {
dataField: 'type',
text: 'Job Type',
editor: {
type: Type.SELECT,
options: [{
value: '1',
label: 'A'
}, {
value: '2',
label: 'B'
}, {
value: '3',
label: 'C'
}, {
value: '4',
label: 'D'
}, {
value: '5',
label: 'E'
}]
}
}];
return (
Value
<BootstrapTable
keyField="id"
data={ stocks }
columns={ columns }
cellEdit={ cellEditFactory({ mode: 'click', blurToSave: true }) }
/>
);
}
}
Metadata
Metadata
Assignees
Labels
No labels