DynamicMenuItem = props => {
    const { renderIf, disabled, rowData: row, ...rest } = props;

    const shouldRender = typeof renderIf === 'function' ? renderIf({ row }) : true;
    const isDisabled = typeof disabled === 'function' ? disabled({ row }) : false;

    if (shouldRender) {
        // eslint-disable-next-line react/jsx-props-no-spreading
        return <MenuItem {...rest} disabled={isDisabled} />;
    }
    return null;
}
A DynamicMenuItem is a menu item meant to be used in the action column of Table. This component adds two new props
that allows to render the item conditionally based on row data.
@category DataView