Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(TransionablePortal): fix state handling #2390

Merged
merged 1 commit into from
Jan 10, 2018

Conversation

layershifter
Copy link
Member

Fixes #2382.

// But, when it's autocontrolled we should change the state to opposite to keep the transition
// queue
if (_.isNil(open)) this.setState({ portalOpen: !portalOpen })
this.setState({ portalOpen: false })
Copy link
Member Author

Choose a reason for hiding this comment

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

I rethought the state handling there and as I see, it was overcomplicated. I've simplified it and it looks that everything is correct.


// Heads up! We simply call `onClose` when component is controlled with `open` prop.
Copy link
Member Author

Choose a reason for hiding this comment

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

Cruft, we don't call onClose and it seems that condition below doesn't make sence.

@codecov-io
Copy link

Codecov Report

Merging #2390 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2390      +/-   ##
==========================================
- Coverage   99.73%   99.73%   -0.01%     
==========================================
  Files         152      152              
  Lines        2664     2662       -2     
==========================================
- Hits         2657     2655       -2     
  Misses          7        7
Impacted Files Coverage Δ
...ddons/TransitionablePortal/TransitionablePortal.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f2f3fc...b1d406d. Read the comment docs.

@levithomason levithomason merged commit 18443ce into master Jan 10, 2018
@levithomason levithomason deleted the fix/transionable-portal-state branch January 10, 2018 07:49
@levithomason
Copy link
Member

Released in semantic-ui-react@0.77.2

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

Successfully merging this pull request may close these issues.

3 participants