Changed the default for update to hold your position in the list
Этот коммит содержится в:
@@ -29,7 +29,7 @@ function getStateFromStores() {
|
|||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: "PostList",
|
displayName: "PostList",
|
||||||
oldZoom: 0,
|
oldZoom: 0,
|
||||||
holdPosition: false, // The default state is to scroll to the bottom on change
|
holdPosition: true, // The default state is to hold your scroll position
|
||||||
// This behavior should NOT be taken advantage of, always set this to the desired state
|
// This behavior should NOT be taken advantage of, always set this to the desired state
|
||||||
|
|
||||||
scrollHeightFromBottom: 0, // This represents the distance from the container's scrollHeight
|
scrollHeightFromBottom: 0, // This represents the distance from the container's scrollHeight
|
||||||
@@ -137,7 +137,7 @@ module.exports = React.createClass({
|
|||||||
} else {
|
} else {
|
||||||
container.scrollTop(container[0].scrollHeight - container.innerHeight());
|
container.scrollTop(container[0].scrollHeight - container.innerHeight());
|
||||||
}
|
}
|
||||||
this.holdPosition = false;
|
this.holdPosition = true;
|
||||||
},
|
},
|
||||||
onResize: function() {
|
onResize: function() {
|
||||||
this.holdPosition = true;
|
this.holdPosition = true;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user