forked from ddrilling/asb_cloud_front
Fixed WellOperations table cell renderer
This commit is contained in:
parent
dd9c49c626
commit
a437972fc5
@ -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) ||
|
||||
|
@ -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}) => {
|
||||
|
Loading…
Reference in New Issue
Block a user