Skip to content

LinkedValueUtils:requestOnChange event.target is undefined #4438

@sarink

Description

@sarink

On 0.14-beta1, the following example does not work:

    var WithoutMixin = React.createClass({
        getInitialState: function() {
            return {message: 'Hello!'};
        },
        handleChange: function(newValue) {
            this.setState({message: newValue});
        },
        render: function() {
            var valueLink = {
                value: this.state.message,
                requestChange: this.handleChange
            };
            return <input type="text" valueLink={valueLink} />;
        }
    });

The console shows Uncaught TypeError: Cannot read property 'value' of undefined when typing into the input field

fwiw, event.currentTarget seems to be set correctly.

Is there a workaround or fix for this?

Thanks

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