diff --git a/apps/jetstream/src/app/components/automation-control/AutomationControlEditorReviewModal.tsx b/apps/jetstream/src/app/components/automation-control/AutomationControlEditorReviewModal.tsx index 056006c84..43177861a 100644 --- a/apps/jetstream/src/app/components/automation-control/AutomationControlEditorReviewModal.tsx +++ b/apps/jetstream/src/app/components/automation-control/AutomationControlEditorReviewModal.tsx @@ -5,8 +5,8 @@ import { SalesforceOrgUi } from '@jetstream/types'; import { AutoFullHeightContainer, DataTable, Icon, Modal, Spinner } from '@jetstream/ui'; import { Fragment, FunctionComponent, useCallback, useEffect, useMemo, useState } from 'react'; import { Column } from 'react-data-grid'; -import { useAmplitude } from '../core/analytics'; import ConfirmPageChange from '../core/ConfirmPageChange'; +import { useAmplitude } from '../core/analytics'; import { deployMetadata, getAutomationTypeLabel, preparePayloads } from './automation-control-data-utils'; import { AutomationDeployStatusRenderer, BooleanAndVersionRenderer } from './automation-control-table-renderers'; import { @@ -37,21 +37,21 @@ const COLUMNS: Column[] = [ { name: 'Old Value', key: 'isActiveInitialState', - formatter: BooleanAndVersionRenderer, + renderCell: BooleanAndVersionRenderer, width: 130, cellClass: 'bg-color-gray', }, { name: 'New Value', key: 'isActive', - formatter: BooleanAndVersionRenderer, + renderCell: BooleanAndVersionRenderer, width: 130, cellClass: 'active-item-yellow-bg', }, { name: 'Status', key: 'status', - formatter: AutomationDeployStatusRenderer, + renderCell: AutomationDeployStatusRenderer, width: 200, }, ]; diff --git a/apps/jetstream/src/app/components/automation-control/AutomationControlEditorTable.tsx b/apps/jetstream/src/app/components/automation-control/AutomationControlEditorTable.tsx index c6e54f34a..17a306a74 100644 --- a/apps/jetstream/src/app/components/automation-control/AutomationControlEditorTable.tsx +++ b/apps/jetstream/src/app/components/automation-control/AutomationControlEditorTable.tsx @@ -43,7 +43,7 @@ export const AutomationControlEditorTable = forwardRef { + renderCell: ({ column, row }) => { return ( (!isTableRow(row) && row.isActive !== row.isActiveInitialState ? 'active-item-yellow-bg' : ''), - formatter: ({ row }) => { + renderCell: ({ row }) => { return ; }, }, @@ -88,7 +88,7 @@ export const AutomationControlEditorTable = forwardRef[]; }, []); diff --git a/apps/jetstream/src/app/components/automation-control/automation-control-table-renderers.tsx b/apps/jetstream/src/app/components/automation-control/automation-control-table-renderers.tsx index 1a5af3c77..5a1795b96 100644 --- a/apps/jetstream/src/app/components/automation-control/automation-control-table-renderers.tsx +++ b/apps/jetstream/src/app/components/automation-control/automation-control-table-renderers.tsx @@ -5,7 +5,7 @@ import classNames from 'classnames'; import isNumber from 'lodash/isNumber'; import uniqueId from 'lodash/uniqueId'; import { FunctionComponent } from 'react'; -import { CalculatedColumn, FormatterProps } from 'react-data-grid'; +import { CalculatedColumn, RenderCellProps } from 'react-data-grid'; import { isTableRow, isTableRowChild, isTableRowItem } from './automation-control-data-utils'; import { DeploymentItemRow, DeploymentItemStatus, MetadataCompositeResponseError, TableRowOrItemOrChild } from './automation-control-types'; @@ -104,7 +104,7 @@ export const LoadingAndActiveRenderer: FunctionComponent<{ } }; -export const AdditionalDetailRenderer: FunctionComponent> = ({ row }) => { +export const AdditionalDetailRenderer: FunctionComponent> = ({ row }) => { if (!isTableRow(row) && Array.isArray(row.additionalData) && row.additionalData.length > 0) { return ( @@ -132,7 +132,7 @@ export const AdditionalDetailRenderer: FunctionComponent> = ({ column, row }) => { +export const BooleanAndVersionRenderer: FunctionComponent> = ({ column, row }) => { const metadata = row; const type = metadata.type; const value = metadata[column.key]; @@ -182,7 +182,7 @@ function getErrorMessageContentString(deployError: Maybe> = ({ row }) => { +export const AutomationDeployStatusRenderer: FunctionComponent> = ({ row }) => { const { status, deploy } = row; const { deployError } = deploy; const isLoading = loadingStatuses.includes(status); diff --git a/apps/jetstream/src/app/components/core/ViewChildRecords.tsx b/apps/jetstream/src/app/components/core/ViewChildRecords.tsx index 4f1ed0ea5..0f4f7ce00 100644 --- a/apps/jetstream/src/app/components/core/ViewChildRecords.tsx +++ b/apps/jetstream/src/app/components/core/ViewChildRecords.tsx @@ -101,7 +101,7 @@ export const ViewChildRecords: FunctionComponent = ({ name: '', width: 40, frozen: true, - groupFormatter: ({ isExpanded }) => ( + renderGroupCell: ({ isExpanded }) => ( = ({ ...setColumnFromType('Id', 'text'), key: 'Id', name: 'Id', - formatter: ({ row }) => { + renderCell: ({ row }) => { return ( = ({ ); }, - groupFormatter: ({ toggleGroup, groupKey, childRows }) => ( + renderGroupCell: ({ toggleGroup, groupKey, childRows }) => (