fixes for lint and compilation errors

This commit is contained in:
Sampath 2024-01-02 23:00:35 +05:30
parent eba617f53f
commit 3c9325ecbc

View File

@ -98,15 +98,15 @@ export class PanelContainerComponent extends React.Component<PanelContainerProps
}; };
private onDissmiss = (ev?: KeyboardEvent | React.SyntheticEvent<HTMLElement>): void => { private onDissmiss = (ev?: KeyboardEvent | React.SyntheticEvent<HTMLElement>): void => {
let elementIdToFocus = sessionStorage.getItem("focusedElementId") || null; const elementIdToFocus = sessionStorage.getItem("focusedElementId") || null;
if (elementIdToFocus) { if (elementIdToFocus) {
let targetElement = document.getElementById(elementIdToFocus); const targetElement = document.getElementById(elementIdToFocus);
if (targetElement) { if (targetElement) {
let focusableParent = this.findFocusableParent(targetElement); const focusableParent = this.findFocusableParent(targetElement);
if (focusableParent) { if (focusableParent) {
setTimeout(() => { setTimeout(() => {
focusableParent.focus(); if (focusableParent) focusableParent.focus();
}, 100); }, 100);
sessionStorage.removeItem("focusedElementId"); sessionStorage.removeItem("focusedElementId");
} }