Skip to content

Commit

Permalink
Fix: Nav Item Api & Webhook and Functions stay selected (#7628)
Browse files Browse the repository at this point in the history
Fixed Nav Item Api & Webhook and Functions stay selected like data model
settings.
 Now when clicked stays selected and deos not loose its selection

Fixes #7573


https://github.com/user-attachments/assets/4cb78158-8411-4ee1-9bcc-2870344c0c62

---------

Co-authored-by: ehconitin <[email protected]>
Co-authored-by: Félix Malfait <[email protected]>
  • Loading branch information
3 people authored Oct 13, 2024
1 parent 38d7f0b commit ccdef0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const SettingsNavigationDrawerItem = ({
Icon,
label,
indentationLevel,
matchSubPages = false,
matchSubPages = true,
path,
soon,
subItemState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ type SettingsNavigationItem = {
label: string;
path: SettingsPath;
Icon: IconComponent;
matchSubPages?: boolean;
indentationLevel?: NavigationDrawerItemIndentationLevel;
matchSubPages?: boolean;
};

const StyledIconContainer = styled.div`
Expand Down Expand Up @@ -90,14 +90,12 @@ export const SettingsNavigationDrawerItems = () => {
label: 'Emails',
path: SettingsPath.AccountsEmails,
Icon: IconMail,
matchSubPages: true,
indentationLevel: 2,
},
{
label: 'Calendars',
path: SettingsPath.AccountsCalendars,
Icon: IconCalendarEvent,
matchSubPages: true,
indentationLevel: 2,
},
];
Expand All @@ -109,7 +107,7 @@ export const SettingsNavigationDrawerItems = () => {
return matchPath(
{
path: pathName,
end: !accountSubSetting.matchSubPages,
end: !accountSubSetting.matchSubPages ?? true,
},
currentPathName,
);
Expand All @@ -134,6 +132,7 @@ export const SettingsNavigationDrawerItems = () => {
label="Accounts"
path={SettingsPath.Accounts}
Icon={IconAt}
matchSubPages={false}
/>
{accountSubSettings.map((navigationItem, index) => (
<SettingsNavigationDrawerItem
Expand Down Expand Up @@ -174,7 +173,6 @@ export const SettingsNavigationDrawerItems = () => {
label="Data model"
path={SettingsPath.Objects}
Icon={IconHierarchy2}
matchSubPages
/>
<SettingsNavigationDrawerItem
label="Integrations"
Expand Down

0 comments on commit ccdef0e

Please sign in to comment.