Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import { TableContext, TableBody, isRowExpanded } from '@patternfly/react-table';
import PropTypes from 'prop-types';
import { TableEditConfirmation } from './constants';
import { showIdWarnings } from './utils/utils';
const propTypes = {
...TableBody.propTypes,
editConfig: PropTypes.shape({
editConfirmationType: PropTypes.oneOf(Object.values(TableEditConfirmation)),
onEditCellClicked: PropTypes.func,
onEditConfirmed: PropTypes.func,
onEditCanceled: PropTypes.func
}).isRequired,
/** Function that is fired when user clicks on a row if not editing. */
onRowClick: PropTypes.func
};
const defaultProps = {
...TableBody.defaultProps,
editConfig: null,
onRowClick: () => undefined
};