Skip to content

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

@daani786

Description

@daani786

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions