Fixed WellOperations table cell renderer

This commit is contained in:
KharchenkoVV 2021-09-16 16:33:03 +05:00
parent dd9c49c626
commit a437972fc5
2 changed files with 4 additions and 6 deletions

View File

@ -135,7 +135,7 @@ export const makeTextColumn = (
...other
})
const defaultNumericRender = (value: any, row: object) => {
export const defaultNumericRender = (value: any, row: object) => {
const placeholder = '-'
if((value === null) ||
(value === undefined) ||

View File

@ -8,7 +8,8 @@ import {
makeColumn,
numericColumnOptions,
makeNumericSorter,
makeDateSorter } from "../../components/Table"
makeDateSorter,
defaultNumericRender } from "../../components/Table"
import LoaderPortal from '../../components/LoaderPortal'
import { invokeWebApiWrapperAsync } from '../../components/factory'
import { WellOperationService} from '../../services/api'
@ -30,10 +31,7 @@ const numericSortColumnOptions = {
const durationFormattedColumnOptions = {
...numericColumnOptions,
render:(value) =>
<div className='text-align-r-container'>
<span>{Number.isNaN(+value) ? "-" : value.toFixed(2)}</span>
</div>
render: defaultNumericRender
}
export const WellOperationsEditor = ({idWell, idType}) => {