react-expression-builder icon indicating copy to clipboard operation
react-expression-builder copied to clipboard

unable to use it in React app, TypeError: e.key is undefined

Open daani786 opened this issue 4 years ago • 0 comments

When i add it in an react app import ExpressionBuilder from 'react-expression-builder'; const ebOptions = [ { value: 'SPLIT (dim, delimiter, occurrence_number)', label: 'SPLIT', type: 'function' }, { value: 'CONCAT (dim1, dim2)', label: 'CONCAT', key: 'concat' }, { value: 'SUB (dim, starting_at, ending_at)', label: 'SUB', key: 'sub' } ]; // Optional - Function called on every state change, store your changes on the server const ebOnChangeFn = editorState => console.log(editorState, editorState.buildExpression())

<ExpressionBuilder onChangeFn={ebOnChangeFn} options={ebOptions} placeholder="Enter your expression" // Optional />

When page loaded, i got this issue

TypeError: e.key is undefined ue/</< /node_modules/react-expression-builder/dist/main.js:9

daani786 avatar Jul 12 '21 13:07 daani786