Skip to content

Commit

Permalink
fixes #212
Browse files Browse the repository at this point in the history
  • Loading branch information
Connoropolous committed Nov 23, 2023
1 parent 4b282b4 commit 348d24c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
12 changes: 12 additions & 0 deletions web/src/components/ExpandedViewMode/ExpandedViewMode.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ const ExpandedViewMode: React.FC<ExpandedViewModeProps> = ({
}
}, [outcomeActionHash])

useEffect(() => {
if (outcome) {
// make sure that a section that isn't available, based on changes
// to the Outcome, isn't shown
if ('Small' in outcome.scope && activeTab === ExpandedViewTab.ChildrenList) {
setActiveTab(ExpandedViewTab.TaskList)
} else if ('Uncertain' in outcome.scope && activeTab === ExpandedViewTab.TaskList) {
setActiveTab(ExpandedViewTab.ChildrenList)
}
}
}, [outcome, activeTab, setActiveTab])

const outcomeId = hashCodeId(outcomeActionHash)

// if not small, then show children list icon on left menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,14 @@ import useOnClickOutside from 'use-onclickoutside'
import TextareaAutosize from 'react-textarea-autosize'
import moment from 'moment'

import {
firstZoomThreshold,
fontSize,
fontSizeExtraLarge,
fontSizeLarge,
lineHeightMultiplier,
secondZoomThreshold,
} from '../../drawing/dimensions'
import './MapViewCreateOutcome.scss'
import {
AgentPubKeyB64,
CellIdString,
ActionHashB64,
Option,
} from '../../types/shared'
import { LinkedOutcomeDetails, Outcome, RelationInput } from '../../types'
import Checkbox from '../Checkbox/Checkbox'
import { LinkedOutcomeDetails, Outcome } from '../../types'
import ButtonCheckbox from '../ButtonCheckbox/ButtonCheckbox'
import { coordsCanvasToPage } from '../../drawing/coordinateSystems'
import Icon from '../Icon/Icon'
Expand Down

0 comments on commit 348d24c

Please sign in to comment.