Tear down AppTile using lifecycle tracking (#7833)
This commit is contained in:
parent
f697301298
commit
a939184e10
8 changed files with 295 additions and 79 deletions
|
@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { Component, CSSProperties } from 'react';
|
||||
import React, { CSSProperties } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import classNames from 'classnames';
|
||||
|
||||
|
@ -58,7 +58,6 @@ export interface ITooltipProps {
|
|||
@replaceableComponent("views.elements.Tooltip")
|
||||
export default class Tooltip extends React.Component<ITooltipProps> {
|
||||
private tooltipContainer: HTMLElement;
|
||||
private tooltip: void | Element | Component<Element, any, any>;
|
||||
private parent: Element;
|
||||
|
||||
// XXX: This is because some components (Field) are unable to `import` the Tooltip class,
|
||||
|
@ -178,7 +177,7 @@ export default class Tooltip extends React.Component<ITooltipProps> {
|
|||
);
|
||||
|
||||
// Render the tooltip manually, as we wish it not to be rendered within the parent
|
||||
this.tooltip = ReactDOM.render<Element>(tooltip, this.tooltipContainer);
|
||||
ReactDOM.render<Element>(tooltip, this.tooltipContainer);
|
||||
};
|
||||
|
||||
public render() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue