Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Input without setProps doesn't get updated #415

Open
novitk opened this issue Dec 11, 2018 · 1 comment
Open

Input without setProps doesn't get updated #415

novitk opened this issue Dec 11, 2018 · 1 comment
Labels
dash-type-bug Something isn't working as intended

Comments

@novitk
Copy link

novitk commented Dec 11, 2018

It looks to me like an Input that doesn't have a setProps (i.e. not an Input dependency) will not get updated state or props:

    componentWillReceiveProps(nextProps) {
        if (this.props.setProps) {
            this.props = nextProps;
            if (this.props.debounce) {
                this.setState({
                    value: nextProps.value,
                });
            }
        }
    }

Attached is a small repro.
inputUpdate.zip

@Marc-Andre-Rivet
Copy link
Contributor

@novitk Thanks. There is no workaround for this at the moment apart from setting up an unused callback with the input's value. Will link to plotly/dash-renderer#98.

@Marc-Andre-Rivet Marc-Andre-Rivet added the dash-type-bug Something isn't working as intended label Dec 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dash-type-bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

2 participants