mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-08 09:15:12 +00:00
Update PanelContainerComponent.tsx
This commit is contained in:
parent
1e5042c2ec
commit
832964f1b9
@ -78,19 +78,27 @@ export class PanelContainerComponent extends React.Component<PanelContainerProps
|
|||||||
}
|
}
|
||||||
|
|
||||||
private onDissmiss = (ev?: KeyboardEvent | React.SyntheticEvent<HTMLElement>): void => {
|
private onDissmiss = (ev?: KeyboardEvent | React.SyntheticEvent<HTMLElement>): void => {
|
||||||
const collection = useSelectedNode.getState().findSelectedCollection();
|
let collection = useSelectedNode.getState().findSelectedCollection();
|
||||||
const targetElement: HTMLElement | null = document.querySelector(`[data-test="${collection.id()}"]`);
|
if (collection) {
|
||||||
|
console.log(collection);
|
||||||
|
const targetElementDataTest: string | undefined = collection.id();
|
||||||
|
const targetElement: HTMLElement | null = document.querySelector(`[data-test="${targetElementDataTest}"]`);
|
||||||
|
if (targetElement) {
|
||||||
|
setTimeout(() => {
|
||||||
|
const moreButton: HTMLElement | null = targetElement.querySelector('[name="More"]');
|
||||||
|
if (moreButton) {
|
||||||
|
console.log(targetElementDataTest, targetElement);
|
||||||
|
moreButton.focus();
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
clearTimeout;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") {
|
if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
} else {
|
} else {
|
||||||
useSidePanel.getState().closeSidePanel();
|
useSidePanel.getState().closeSidePanel();
|
||||||
}
|
}
|
||||||
if (targetElement) {
|
|
||||||
const moreButton: HTMLElement | null = targetElement.querySelector('[name="More"]');
|
|
||||||
if (moreButton) {
|
|
||||||
moreButton.focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private getPanelHeight = (): string => {
|
private getPanelHeight = (): string => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user