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, SuffixComponent = TL2,
textStyle = it => {}, textStyle = it => {},
isHidden = it => false, isHidden = it => false,
view = it => it?.toString() ?? '—', view = it => it?.toString(),
inputProps = {} inputProps = {}
} = config } = config

View file

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