Skip to content

Instantly share code, notes, and snippets.

@rjhilgefort
Created July 29, 2019 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjhilgefort/644a8a11e0303cedc539b7d17bcd7368 to your computer and use it in GitHub Desktop.
Save rjhilgefort/644a8a11e0303cedc539b7d17bcd7368 to your computer and use it in GitHub Desktop.
import { curry } from 'lodash/fp'
import PropTypes, { func, shape } from 'prop-types'
const args = {
openEntity: func.isRequired,
closeEntity: func.isRequired,
gridApi: shape({
getDisplayedRowCount: func.isRequired,
isQuickFilterPresent: func.isRequired,
}).isRequired,
}
export const accordionMultigridOnFilterChanged = curry(
({ openEntity, closeEntity }, { gridApi }) => {
PropTypes.checkPropTypes(
args,
{ openEntity, closeEntity, gridApi },
'argument',
'accordionMultigridOnFilterChanged',
)
// ...
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment