chore: note regarding reactivity

This commit is contained in:
dannyrb 2020-02-24 11:20:10 -05:00
parent ea2ab1a25e
commit 141e1cf648

View File

@ -71,9 +71,9 @@ class ToolbarRow extends Component {
const hasActiveContext = this.props.activeContexts.some(actx => const hasActiveContext = this.props.activeContexts.some(actx =>
contexts.includes(actx) contexts.includes(actx)
); );
// TODO: what should `isDisabled` receive?
// studies? activeViewport?
// It's a bit beefy to pass studies; probably only need to be reactive on `studyInstanceUIDs` and activeViewport? // It's a bit beefy to pass studies; probably only need to be reactive on `studyInstanceUIDs` and activeViewport?
// Note: This does not cleanly handle `studies` prop updating with panel open
const isDisabled = menuOption.isDisabled(this.props.studies); const isDisabled = menuOption.isDisabled(this.props.studies);
if (hasActiveContext && !isDisabled) { if (hasActiveContext && !isDisabled) {