Skip to content

BaseSelectedListMake selection optional, Change render to any#3839

Merged
amyngu merged 3 commits into
microsoft:masterfrom
amyngu:fixRenderForSelectedPeopleList
Jan 30, 2018
Merged

BaseSelectedListMake selection optional, Change render to any#3839
amyngu merged 3 commits into
microsoft:masterfrom
amyngu:fixRenderForSelectedPeopleList

Conversation

@amyngu

@amyngu amyngu commented Jan 30, 2018

Copy link
Copy Markdown
Contributor

Pull request checklist

  • Include a change request file using $ npm run change

Description of changes

  • Make selection optional (default/fallback selection created if props.selection is null)
  • Change render typedef to any, to allow use with lower versions of types/react

@amyngu

amyngu commented Jan 30, 2018

Copy link
Copy Markdown
Contributor Author

@joschect & @dzearing I'd appreciate a timely sign off on this, as it is preventing another dev on integrating with experiments

this.selection.setAllSelected(false);
}

public componentWillUpdate(newProps: P, newState: IBaseSelectedItemsListState): void {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since props can also contain selection, you also need to override this.selection if they pass in a new selection.

@joschect joschect left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with suggestion

@amyngu amyngu merged commit 0bcc287 into microsoft:master Jan 30, 2018
@amyngu amyngu deleted the fixRenderForSelectedPeopleList branch January 30, 2018 22:09
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants