This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { HeaderActionResponse } from "cdm/HeaderActionModel";
1212import { HeaderMenuProps } from "cdm/HeaderModel" ;
1313import Box from "@mui/material/Box" ;
1414import ClickAwayListener from "@mui/material/ClickAwayListener" ;
15+ import { Platform } from "obsidian" ;
1516
1617const HeaderMenu = ( headerMenuProps : HeaderMenuProps ) => {
1718 const { table, column } = headerMenuProps . headerProps ;
@@ -104,11 +105,22 @@ const HeaderMenu = (headerMenuProps: HeaderMenuProps) => {
104105 persistLabelChange ( ) ;
105106 } ;
106107
108+ const handleClickAway = ( ) => {
109+ setMenuEl ( null ) ;
110+ setTypesEl ( null ) ;
111+ setTypesTimeout ( null ) ;
112+ } ;
113+
107114 return (
108115 < Popper id = { idMenu } open = { openMenu } anchorEl = { menuEl } key = { idMenu } >
109- < ClickAwayListener onClickAway = { ( ) => setMenuEl ( null ) } >
116+ < ClickAwayListener onClickAway = { handleClickAway } >
110117 < Box >
111- < div className = { `menu ${ c ( "popper" ) } ` } >
118+ < div
119+ className = { `menu ${ c ( "popper" ) } ` }
120+ style = { {
121+ width : Platform . isMobile ? "240px" : "auto" ,
122+ } }
123+ >
112124 { /** Edit header label section */ }
113125 { ! isMetadata && (
114126 < >
You can’t perform that action at this time.
0 commit comments