({isDisabled, title, onClick})
| 478 | } |
| 479 | |
| 480 | export function getEditCell({isDisabled, title, onClick}) { |
| 481 | const Cell = ({ row }) => { |
| 482 | return <PgIconButton data-test="expand-row" title={title} icon={<EditRoundedIcon fontSize="small" />} className='pgrt-cell-button' |
| 483 | onClick={()=>{ |
| 484 | onClick ? onClick(row) : row.toggleExpanded(); |
| 485 | }} disabled={isDisabled?.(row)} |
| 486 | />; |
| 487 | }; |
| 488 | |
| 489 | Cell.displayName = 'EditCell'; |
| 490 | Cell.propTypes = { |
| 491 | row: PropTypes.any, |
| 492 | }; |
| 493 | |
| 494 | return Cell; |
| 495 | } |
| 496 | |
| 497 | export function getDeleteCell({isDisabled, title, onClick}) { |
| 498 | const Cell = ({ row }) => ( |
no outgoing calls
no test coverage detected