Skip to content

Commit fe7a380

Browse files
committed
Absolutely positioned entering component fills its parent's width.
1 parent 6101286 commit fe7a380

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
### v1.1.0 (24 November 2015)
2+
3+
* [ENHANCEMENT] The entering component, which is absolutely positioned, is not only positioned with `top:0` and `left:0`
4+
styles, but also `right:0` and `bottom:0` so smaller content fills the entire container.
5+
16
### v1.0.1 (24 November 2015)
27

38
* [ENHANCEMENT] Support no children so the child component can be removed / added. (Fixes #4)

UPGRADE_GUIDE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Upgrade Guide
22

3+
## 1.0.x -> 1.1.0
4+
5+
The entering component use to be positioned on top of the leaving component with
6+
`position: absolute`, `top:0` and `left:0` styles. If this component has narrow content
7+
and depends on its outer element to fill its parent's width this will no longer happen
8+
one it is absolutely positioned and thus the content will be narrow while animating and
9+
then jump to the proper width when the animation completes. By also specifying `right:0`
10+
and `bottom:0` styles the entering component now remains stretched to its parent's width.
11+
12+
This change should go unnoticed in most use cases, but it is conceivable that it might
13+
be a breaking change and thus the minor version bump. If there is a use case that
14+
absolutely requires not setting `right` and `bottom` styles open an issue or PR and we
15+
can look at adding a prop to disable this.
16+
17+
318
## 0.2.x -> 1.0.0
419

520
#### Specify the transition delay

src/ReactCSSTransitionReplace.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,10 @@ export default class ReactCSSTransitionReplace extends React.Component {
202202
{
203203
style: {
204204
position: 'absolute',
205+
top: 0,
205206
left: 0,
206-
top: 0
207+
right: 0,
208+
bottom: 0
207209
},
208210
key: 'next'
209211
},

0 commit comments

Comments
 (0)