diff --git a/src/Editor.js b/src/Editor.js index cb157dca4..caaa032db 100644 --- a/src/Editor.js +++ b/src/Editor.js @@ -37,11 +37,18 @@ const editor = function(editable, attr, format, editorClass, defaultValue, ignor let options = []; const values = editable.options.values; if (Array.isArray(values)) {// only can use arrray data for options - let rowValue; - options = values.map((d, i) => { - rowValue = format ? format(d) : d; + let text; + let value; + options = values.map((option, i) => { + if (typeof option === 'object') { + text = option.text; + value = option.value; + } else { + text = format ? format(option) : option; + value = option; + } return ( - + ); }); }