Skip to content

"The prop value with an expression type of AssignmentExpression could not be resolved." #42

@notatestuser

Description

@notatestuser

Error trace:

The prop value with an expression type of AssignmentExpression could not be resolved. Please file issue to get this fixed immediately. Error: The prop value with an expression type of AssignmentExpression could not be resolved. Please file issue to get this fixed immediately. at extract (jsx-ast-utils\lib\values\expressions\index.js:175:11) at Object.extractValueFromLogicalExpression [as LogicalExpression] (jsx-ast-utils\lib\values\expressions\LogicalExpression.js:28:38) at Object.extract [as JSXExpressionContainer] (jsx-ast-utils\lib\values\expressions\index.js:178:21) at getValue (jsx-ast-utils\lib\values\index.js:48:27) at extractValue (jsx-ast-utils\lib\getPropValue.js:24:12) at getPropValue (jsx-ast-utils\lib\getPropValue.js:41:10) at eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js:79:95 at Array.some (native) at EventEmitter.JSXOpeningElement (eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js:75:52) 

After stepping through I've found the culprit in the onClick assignment here:

this._options.map((config, key) => <DropdownBox.Item key={key} onClick={this._cachedOnClickItemHandlers[key] || (this._cachedOnClickItemHandlers[key] = this._onClickItem.bind(null, config))}> {config.label} </DropdownBox.Item>)

Yeah, not the nicest code, but I guess this shouldn't break eslint

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions