Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Fix Scrollable-Pane getComputedStyle error - changing timeouts to use this._async.setTimeout to ensure this.refs isn't used after componentWillUnmount",
"type": "minor"
}
],
"packageName": "office-ui-fabric-react",
"email": "davsm@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class ScrollablePaneBase extends BaseComponent<IScrollablePaneProps, {}>

this._events.on(root, 'scroll', this.notifySubscribers);
this._events.on(window, 'resize', this._onWindowResize);
setTimeout(() => {
this._async.setTimeout(() => {
this._resizeContainer();
if (stickyContainer.parentElement && root.parentElement) {
stickyContainer.parentElement.removeChild(stickyContainer);
Expand Down Expand Up @@ -171,7 +171,7 @@ export class ScrollablePaneBase extends BaseComponent<IScrollablePaneProps, {}>
this._setPlaceholderHeights.bind(null, stickyList),
false);
if (sticky.props.stickyClassName) {
setTimeout(() => {
this._async.setTimeout(() => {
if (sticky.props.stickyClassName) {
sticky.content.children[0].classList.add(sticky.props.stickyClassName);
}
Expand All @@ -191,7 +191,7 @@ export class ScrollablePaneBase extends BaseComponent<IScrollablePaneProps, {}>
}

private _onWindowResize() {
setTimeout(() => {
this._async.setTimeout(() => {
this._resizeContainer();
this.notifySubscribers();
this._setPlaceholderHeights(this._stickyAbove);
Expand Down