Skip to content

Commit

Permalink
don't show autosave option if autosave is not active
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodlz committed Sep 25, 2023
1 parent 186463c commit 97c0d1d
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions extensions/skyportal/static/js/components/FilterPlugins.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1030,30 +1030,32 @@ const FilterPlugins = ({ group }) => {
)}
</div>
<div style={{ display: "flex", flexDirection: "row", alignItems: "end", gap: "1rem", marginTop: "1rem" }}>
<div>
<InputLabel id="groupsSelectLabel">
{`Don't autosave if in groups (optional)`}
</InputLabel>
<Select
inputProps={{ MenuProps: { disableScrollLock: true } }}
labelId="groupsSelectLabel"
value={selectedGroupIds}
onChange={onSubmitSaveAutosaveGroups}
name="autosaveGroupsSelect"
className={classes.allocationSelect}
multiple
>
{(userAccessibleGroups || []).map((group) => (
<MenuItem
value={group.id}
key={group.id}
className={classes.SelectItem}
>
{group.name}
</MenuItem>
))}
</Select>
</div>
{filter_v?.fv && (filter_v?.autosave?.active === true || filter_v?.autosave === true) && (
<div>
<InputLabel id="groupsSelectLabel">
{`Don't autosave if in groups (optional)`}
</InputLabel>
<Select
inputProps={{ MenuProps: { disableScrollLock: true } }}
labelId="groupsSelectLabel"
value={selectedGroupIds}
onChange={onSubmitSaveAutosaveGroups}
name="autosaveGroupsSelect"
className={classes.allocationSelect}
multiple
>
{(userAccessibleGroups || []).map((group) => (
<MenuItem
value={group.id}
key={group.id}
className={classes.SelectItem}
>
{group.name}
</MenuItem>
))}
</Select>
</div>
)}
</div>
<div className={classes.divider} />
{/* AUTO FOLLOWUP */}
Expand Down

0 comments on commit 97c0d1d

Please sign in to comment.