-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I found a bug in VisualizeModal: in setStateFromProps(props), we create columns object and set into state. But setStateFromProps will be called every componentWillReceiveProps, which means when user close Modal, open Modal etc, it will reset columns state to original props. As a result if user changed any checkbox, then close and re-open modal, his previous change will lost. This thing will become more annoying when mixed with redux updating its state. I think we should keep 'columns' as a local state, and it should remember states even after user close Modal and reopen it. my fix is just calling setStateFromProps from constructor, not from every componentWillReceiveProps.
- Loading branch information
Grace Guo
committed
Jun 3, 2017
1 parent
0d3f57a
commit 55e01cf
Showing
2 changed files
with
39 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters