fix: fix wallet table width

This commit is contained in:
José Oliveira 2021-11-16 21:36:00 +00:00
parent 82490145cd
commit 12e9523554
3 changed files with 11 additions and 6 deletions

View file

@ -127,6 +127,8 @@ const ETable = ({
((enableToggle && toggleWidth) ?? 0) ((enableToggle && toggleWidth) ?? 0)
const width = getWidth(elements) + actionColSize const width = getWidth(elements) + actionColSize
console.log(width, getWidth(elements), actionColSize)
console.log(elements)
const classes = useStyles({ width }) const classes = useStyles({ width })
const showButtonOnEmpty = !data.length && enableCreate && !adding const showButtonOnEmpty = !data.length && enableCreate && !adding

View file

@ -12,5 +12,8 @@ export default {
}, },
selection: { selection: {
marginRight: 12 marginRight: 12
},
table: {
width: 1000
} }
} }

View file

@ -95,7 +95,7 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
{ {
name: 'id', name: 'id',
header: 'Cryptocurrency', header: 'Cryptocurrency',
width: 180 - widthAdjust, width: 150 - widthAdjust,
view: viewCryptoCurrency, view: viewCryptoCurrency,
size: 'sm', size: 'sm',
editable: false editable: false
@ -105,7 +105,7 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
size: 'sm', size: 'sm',
stripe: true, stripe: true,
view: getDisplayName('ticker'), view: getDisplayName('ticker'),
width: 190 - widthAdjust, width: 175 - widthAdjust,
input: Autocomplete, input: Autocomplete,
inputProps: { inputProps: {
options: getOptions('ticker'), options: getOptions('ticker'),
@ -119,7 +119,7 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
size: 'sm', size: 'sm',
stripe: true, stripe: true,
view: getDisplayName('wallet'), view: getDisplayName('wallet'),
width: 190 - widthAdjust, width: 175 - widthAdjust,
input: Autocomplete, input: Autocomplete,
inputProps: { inputProps: {
options: getOptions('wallet'), options: getOptions('wallet'),
@ -134,7 +134,7 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
size: 'sm', size: 'sm',
stripe: true, stripe: true,
view: getDisplayName('exchange'), view: getDisplayName('exchange'),
width: 190 - widthAdjust, width: 175 - widthAdjust,
input: Autocomplete, input: Autocomplete,
inputProps: { inputProps: {
options: getOptions('exchange'), options: getOptions('exchange'),
@ -151,7 +151,7 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
stripe: true, stripe: true,
view: getDisplayName('zeroConf'), view: getDisplayName('zeroConf'),
input: Autocomplete, input: Autocomplete,
width: 220 - widthAdjust, width: 210 - widthAdjust,
inputProps: { inputProps: {
options: getOptions('zeroConf'), options: getOptions('zeroConf'),
valueProp: 'code', valueProp: 'code',
@ -168,7 +168,7 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
view: (it, row) => view: (it, row) =>
row.id === 'ETH' ? <span style={classes.editDisabled}>{it}</span> : it, row.id === 'ETH' ? <span style={classes.editDisabled}>{it}</span> : it,
input: NumberInput, input: NumberInput,
width: 190 - widthAdjust, width: 145 - widthAdjust,
inputProps: { inputProps: {
decimalPlaces: 0 decimalPlaces: 0
}, },