FIX: Close the sheet list menu when a sheet is selected
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
39174add1f
commit
15da2e5785
@@ -82,7 +82,7 @@ const SheetListMenu = (properties: SheetListMenuProps) => {
|
|||||||
{sheetOptionsList.map((tab, index) => (
|
{sheetOptionsList.map((tab, index) => (
|
||||||
<StyledMenuItem
|
<StyledMenuItem
|
||||||
key={tab.sheetId}
|
key={tab.sheetId}
|
||||||
onClick={(): void => onSheetSelected(index)}
|
onClick={() => onSheetSelected(index)}
|
||||||
>
|
>
|
||||||
<ItemColor style={{ backgroundColor: tab.color }} />
|
<ItemColor style={{ backgroundColor: tab.color }} />
|
||||||
<ItemName>{tab.name}</ItemName>
|
<ItemName>{tab.name}</ItemName>
|
||||||
|
|||||||
@@ -81,7 +81,10 @@ function Navigation(props: NavigationProps) {
|
|||||||
isOpen={open}
|
isOpen={open}
|
||||||
close={handleClose}
|
close={handleClose}
|
||||||
sheetOptionsList={sheets}
|
sheetOptionsList={sheets}
|
||||||
onSheetSelected={onSheetSelected}
|
onSheetSelected={(index) => {
|
||||||
|
onSheetSelected(index);
|
||||||
|
handleClose();
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user