From 75657398c629b3dd9063800aa77018de2bd9f767 Mon Sep 17 00:00:00 2001 From: KharchenkoVV Date: Wed, 1 Sep 2021 11:58:50 +0500 Subject: [PATCH] Added align: right to numeric EditableCells in Operations table --- .../WellOperations/WellOperationsEditor.jsx | 16 +++++++++++++--- src/styles/index.css | 5 +++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/pages/WellOperations/WellOperationsEditor.jsx b/src/pages/WellOperations/WellOperationsEditor.jsx index 8d9a48e..25daed9 100644 --- a/src/pages/WellOperations/WellOperationsEditor.jsx +++ b/src/pages/WellOperations/WellOperationsEditor.jsx @@ -20,11 +20,18 @@ const basePageSize = 160; const format='YYYY.MM.DD HH:mm' const numericSortColumnOptions = Object.assign({ - sorter: makeNumericSorter('wellDepth') + sorter: makeNumericSorter('wellDepth'), + render:(value) => +
+ {value} +
}, numericColumnOptions) const durationFormattedColumnOptions = Object.assign({ - render:(value) => Number.isNaN(value.toFixed(2)) ? "-" : value.toFixed(2) + render:(value) => +
+ {Number.isNaN(value.toFixed(2)) ? "-" : value.toFixed(2)} +
}, numericColumnOptions) @@ -81,7 +88,10 @@ export const WellOperationsEditor = ({idWell, idType}) => { width:200, input:, sorter: makeDateSorter('startDate'), - render:(_, record) => moment.utc(record.startDate).local().format(format) + render:(_, record) => +
+ {moment.utc(record.startDate).local().format(format)} +
}), makeColumn('Часы','durationHours', durationFormattedColumnOptions), makeColumn('Комментарий','comment', {editable:true, input: