Skip to content

componentWillReceiveProps() is not honouring old state #163

Closed
@gvelo

Description

@gvelo

when currentView = 'days' and update.open === undefined , if the datepicker state was open, it should remain open. In other words, when currentView = 'days and the parent component re render executing datepicker componentWillReceiveProps(), datepicker will close.

if ( update.open === undefined ){
            if ( this.props.closeOnSelect && this.state.currentView !== 'time' ){
                update.open = false;
            }
            else {
                update.open = this.state.open;
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions