refactor: pull down default view to a higher hierarchical level component

This commit is contained in:
Sérgio Salgado 2021-11-12 15:31:44 +00:00
parent 20a3c40c48
commit 6932579bbf
2 changed files with 2 additions and 1 deletions

View file

@ -132,7 +132,7 @@ const ECol = ({ editing, focus, config, extraPaddingRight, extraPadding }) => {
SuffixComponent = TL2,
textStyle = it => {},
isHidden = it => false,
view = it => it?.toString() ?? '—',
view = it => it?.toString(),
inputProps = {}
} = config

View file

@ -140,6 +140,7 @@ const FiatBalanceOverrides = ({ section }) => {
inputProps: {
decimalPlaces: 0
},
view: it => it?.toString() ?? '—',
isHidden: value =>
it >
machines.find(({ deviceId }) => deviceId === value.machine)