本文整理汇总了TypeScript中react-dom.unmountComponentAtNode函数的典型用法代码示例。如果您正苦于以下问题:TypeScript unmountComponentAtNode函数的具体用法?TypeScript unmountComponentAtNode怎么用?TypeScript unmountComponentAtNode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了unmountComponentAtNode函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: onDisposeCell
@override
public onDisposeCell(event: IFieldCustomizerCellEventParameters): void {
// This method should be used to free any resources that were allocated during rendering.
// For example, if your onRenderCell() called ReactDOM.render(), then you should
// call ReactDOM.unmountComponentAtNode() here.
ReactDOM.unmountComponentAtNode(event.cellDiv);
super.onDisposeCell(event);
}
开发者ID:AdrianDiaz81,项目名称:sp-dev-fx-extensions,代码行数:8,代码来源:ToggleFieldCustomizer.ts
示例2: removeLastTemplate
export function removeLastTemplate() {
if (_lastTemplateDiv) {
ReactDOM.unmountComponentAtNode(_lastTemplateDiv);
if (_lastTemplateDiv.parentElement) {
_lastTemplateDiv.parentElement.removeChild(_lastTemplateDiv);
}
_lastTemplateDiv = null;
}
}
开发者ID:breezeflow,项目名称:breezeflow,代码行数:9,代码来源:test-util.ts
示例3:
childWindow.onbeforeunload = () => {
if (popoutContainer) {
ReactDOM.unmountComponentAtNode(popoutContainer)
}
if (_.isFunction(options.onClosing)) {
options.onClosing()
}
}
开发者ID:carlosrfernandez,项目名称:ReactiveTraderCloud,代码行数:9,代码来源:browserPopoutService.ts
示例4:
scope.$on('$destroy', () => {
if (!attrs.onScopeDestroy) {
ReactDOM.unmountComponentAtNode(elem[0]);
} else {
scope.$eval(attrs.onScopeDestroy, {
unmountComponent: ReactDOM.unmountComponentAtNode.bind(this, elem[0]),
});
}
});
开发者ID:ArcticSnowman,项目名称:grafana,代码行数:9,代码来源:ng_react.ts
示例5: onPanelTeardown
onPanelTeardown() {
this.thresholdManager = null;
this.timeRegionManager = null;
if (this.plot) {
this.plot.destroy();
this.plot = null;
}
this.tooltip.destroy();
this.elem.off();
this.elem.remove();
ReactDOM.unmountComponentAtNode(this.legendElem);
}
开发者ID:CorpGlory,项目名称:grafana,代码行数:15,代码来源:graph.ts
示例6: onRender
onRender(renderData) {
this.data = renderData || this.data;
if (!this.data) {
return;
}
this.annotations = this.ctrl.annotations || [];
this.buildFlotPairs(this.data);
const graphHeight = this.elem.height();
updateLegendValues(this.data, this.panel, graphHeight);
if (!this.panel.legend.show) {
if (this.legendElem.hasChildNodes()) {
ReactDOM.unmountComponentAtNode(this.legendElem);
}
this.renderPanel();
return;
}
const { values, min, max, avg, current, total } = this.panel.legend;
const { alignAsTable, rightSide, sideWidth, sort, sortDesc, hideEmpty, hideZero } = this.panel.legend;
const legendOptions = { alignAsTable, rightSide, sideWidth, sort, sortDesc, hideEmpty, hideZero };
const valueOptions = { values, min, max, avg, current, total };
const legendProps: GraphLegendProps = {
seriesList: this.data,
hiddenSeries: this.ctrl.hiddenSeries,
...legendOptions,
...valueOptions,
onToggleSeries: this.ctrl.onToggleSeries,
onToggleSort: this.ctrl.onToggleSort,
onColorChange: this.ctrl.onColorChange,
onToggleAxis: this.ctrl.onToggleAxis,
};
const legendReactElem = React.createElement(LegendWithThemeProvider, legendProps);
ReactDOM.render(legendReactElem, this.legendElem, () => this.renderPanel());
}
开发者ID:CorpGlory,项目名称:grafana,代码行数:37,代码来源:graph.ts
示例7: unmountElement
unmountElement() {
ReactDOM.unmountComponentAtNode(this.getRootElement());
}
开发者ID:syesildag,项目名称:jreact,代码行数:3,代码来源:jreactWrapper.ts
示例8: unmount
public unmount() {
ReactDOM.unmountComponentAtNode(this.container);
}
开发者ID:infoarte,项目名称:WIP,代码行数:3,代码来源:harness.ts
示例9:
params.api.addVirtualRowListener('virtualRowRemoved', params.rowIndex, () => {
ReactDOM.unmountComponentAtNode(eCell);
});
开发者ID:chejen,项目名称:ag-grid-react,代码行数:3,代码来源:ReactCellRendererFactory.ts
示例10: removeViewFromDom
export function removeViewFromDom(parentElement: HTMLElement, childElement: HTMLElement): Promise<any> {
ReactDOM.unmountComponentAtNode(childElement);
parentElement.removeChild(childElement);
return Promise.resolve();
}
开发者ID:GHernansanz,项目名称:ionic,代码行数:5,代码来源:react-framework-delegate.ts
注:本文中的react-dom.unmountComponentAtNode函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论