Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value of input not updating correctly when inside Transition.Group #2040

Closed
Ruben9922 opened this issue Sep 2, 2017 · 1 comment
Closed
Assignees
Labels

Comments

@Ruben9922
Copy link

Ruben9922 commented Sep 2, 2017

Steps

  • Created new React app using create-react-app in WebStorm

  • Installed semantic-ui-react and semantic-ui-css npm packages

  • Changed the App class in App.js to the following:

    class App extends Component {
      constructor(props) {
        super(props);
        this.state = {
          x: ""
        };
      }
    
      render() {
        return (
          <div>
            <Transition.Group>
              <Input value={this.state.x} onChange={e => {
                this.setState({x: e.target.value});
                console.log(e.target.value);
              }}/>
            </Transition.Group>
          </div>
        );
      }
    }
    

Expected Result

With the above code, value should contain the inputted text, so the inputted text is displayed in the browser and outputted to the console.

Actual Result

Value of input field seems to not be updating properly.

Input field is not updated in the browser (so it appears read-only), and value appears to only contain the last character entered when outputted to the console.

Same behaviour also occurs with Form.Input and normal input.

Version

0.72.0

Testcase

https://codepen.io/anon/pen/Ljqwdb

@layershifter layershifter self-assigned this Sep 4, 2017
@layershifter
Copy link
Member

@Ruben9922 Thanks for detailed report, PR is coming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants