improvement: add isShownKey prop to Operation to allow overriding (#5196)

* Added optional isShownKey prop to Componenent to allow overriding

* Removed unneccasry  before is isShwonKey

* Added PropTypes to isShownKey

* Added isShownKey to <OperationWrapper/> and removed it from <Operation />

* Removed isShwonKey prop it from <Operation />

* revert package-lock.json

Co-authored-by: kyle shockey <kyleshockey@gmail.com>
This commit is contained in:
geraldglynn
2020-03-09 01:59:15 +00:00
committed by GitHub
parent a2b37ec157
commit 54f82df3c3

View File

@@ -10,7 +10,8 @@ const Wrapper = (Ori, system) => class OperationWrapper extends React.Component
onLoad = (ref) => { onLoad = (ref) => {
const { operation } = this.props const { operation } = this.props
const { tag, operationId } = operation.toObject() const { tag, operationId } = operation.toObject()
const isShownKey = ["operations", tag, operationId] let { isShownKey } = operation.toObject()
isShownKey = isShownKey || ["operations", tag, operationId]
system.layoutActions.readyToScroll(isShownKey, ref) system.layoutActions.readyToScroll(isShownKey, ref)
} }