Fix stickerpicker not having correct contexts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
a1352622ea
commit
a2280aae64
1 changed files with 7 additions and 3 deletions
|
@ -21,6 +21,8 @@ import {throttle} from "lodash";
|
||||||
import ResizeObserver from 'resize-observer-polyfill';
|
import ResizeObserver from 'resize-observer-polyfill';
|
||||||
|
|
||||||
import dis from '../../../dispatcher/dispatcher';
|
import dis from '../../../dispatcher/dispatcher';
|
||||||
|
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||||
|
import {MatrixClientPeg} from "../../../MatrixClientPeg";
|
||||||
|
|
||||||
// Shamelessly ripped off Modal.js. There's probably a better way
|
// Shamelessly ripped off Modal.js. There's probably a better way
|
||||||
// of doing reusable widgets like dialog boxes & menus where we go and
|
// of doing reusable widgets like dialog boxes & menus where we go and
|
||||||
|
@ -144,9 +146,11 @@ export default class PersistedElement extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderApp() {
|
renderApp() {
|
||||||
const content = <div ref={this.collectChild} style={this.props.style}>
|
const content = <MatrixClientContext.Provider value={MatrixClientPeg.get()}>
|
||||||
{this.props.children}
|
<div ref={this.collectChild} style={this.props.style}>
|
||||||
</div>;
|
{this.props.children}
|
||||||
|
</div>
|
||||||
|
</MatrixClientContext.Provider>;
|
||||||
|
|
||||||
ReactDOM.render(content, getOrCreateContainer('mx_persistedElement_'+this.props.persistKey));
|
ReactDOM.render(content, getOrCreateContainer('mx_persistedElement_'+this.props.persistKey));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue