Skip to content

Commit

Permalink
fix(settings): set unmountOnExit behaviour for setting groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Thuan Vo authored and andrewazores committed May 2, 2023
1 parent 7ce8bc6 commit 42a7264
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 479 deletions.
13 changes: 5 additions & 8 deletions src/app/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,10 @@ export const Settings: React.FC<SettingsProps> = (_) => {
</Tabs>
</SidebarPanel>
<SidebarContent>
{settingGroups.map((grp) => (
<div
key={`${grp.groupKey}-setting`}
className={css('settings__content', grp.groupKey === activeTab ? 'active' : '')}
>
<Form>
{settingGroups
.filter((grp) => grp.groupKey === activeTab)
.map((grp) => (
<Form key={`${grp.groupKey}-setting`} className="settings__content">
{grp.settings.map((s, index) => (
<FeatureFlag level={s.featureLevel} key={`${grp.groupLabel}-${s.title}-${index}-flag`}>
<FormGroup
Expand Down Expand Up @@ -232,8 +230,7 @@ export const Settings: React.FC<SettingsProps> = (_) => {
</FeatureFlag>
))}
</Form>
</div>
))}
))}
</SidebarContent>
</Sidebar>
</Card>
Expand Down
2 changes: 1 addition & 1 deletion src/app/Shared/TargetSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export const TargetSelect: React.FunctionComponent<TargetSelectProps> = ({ onSel
selections={selected.alias || selected.connectUrl}
isFlipEnabled={true}
menuAppendTo="parent"
maxHeight="16em"
maxHeight="20em"
isOpen={isDropdownOpen}
aria-label="Select Target"
>
Expand Down
5 changes: 0 additions & 5 deletions src/app/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,6 @@ input[type=number].datetime-picker__number-input {

.settings__content {
padding: 2ch;
display: none; /* only show when active */
}

.settings__content.active {
display: block;
}

.expandable-form__accordion-toggle-block {
Expand Down
Loading

0 comments on commit 42a7264

Please sign in to comment.