Tear down AppTile using lifecycle tracking (#7833)

This commit is contained in:
J. Ryan Stinnett 2022-02-17 16:30:36 +00:00 committed by GitHub
parent f697301298
commit a939184e10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 295 additions and 79 deletions

View file

@ -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() {