Skip to content

Conversation

@home3k
Copy link

@home3k home3k commented Aug 4, 2016

    componentWillReceiveProps(nextProps) {
        this._updateSelectedOptions(nextProps.selectedOptions);
        this.setState({
            disabled: nextProps.disabled
        });
    }
    _updateSelectedOptions(selectedOptions) {
        this.setState({
            selectedOptions,
            dataSource: this.ds.cloneWithRows(this.props.options)
        });
    }

The dataSource not change when nextProps.options changed.

        this._updateSelectedOptions(nextProps.selectedOptions, nextProps.options);
        this.setState({
            selectedOptions,
            dataSource: options ? this.ds.cloneWithRows(options) : this.ds.cloneWithRows(this.props.options)
        });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant