I have a column I want to edit with a dropdown. The dropdown populates ok but after focus moves out of the edited cell (Person column), I get a strange value displayed:
Here is my code:
import {Grid, WidgetHelper, Store, DataGenerator} from './build/grid.module.js';
const personStore = new Store({
data : [
{ value: 'PERS-1', text : 'Bilbo Baggins' },
{ value: 'PERS-2', text : 'Samwise Gamjee' },
{ value: 'PERS-3', text : 'Peregrin Took' }
]
});
const grid = new Grid({
appendTo: 'target',
features : {
cellEdit: true,
stripe: true
},
showDirty: true,
columns: [
{ field: 'person', text: 'Person', editor : { type : 'dropdown', store : personStore }, width: 300 , locked: true },
{ field: 'role', text: 'Role', width: 150, locked: true },
{ field: 'team', text: 'Team', width: 150, locked: true },
{ text: '2019<br>Nov', type: 'percent', field: 'capacity', width: 60}
],
data : [
{person: 'Select', role: 'Select', team: 'Select', capacity: 0}
]
});
Thanks!
Ben