Scenario:
const columns = [
{
name: 'Column',
width: '36%',
mobileOptions: {
fullWidth: true,
},
},
// ...
];
This outputs the following HTML:
<td class="euiTableRowCell euiTableRowCell--isMobileFullWidth" style="width: 36%;">
But unfortunately, .euiTableRowCell--isMobileFullWidth doesn't override the inline styles, so fullWidth: true is not working on mobile.
Possible solutions
- Add
!important to .euiTableRowCell--isMobileFullWidth so that it overrides inline style widths
- Add the
width property to mobileOptions, so users can do this instead of using fullWidth:
const columns = [
{
name: 'Column',
width: '36%',
mobileOptions: {
width: '100%',
},
},
];
No strong preference/feelings here on which folks go with - whatever's either easier or feels better API-wise is fine by me!
Scenario:
This outputs the following HTML:
But unfortunately,
.euiTableRowCell--isMobileFullWidthdoesn't override the inline styles, sofullWidth: trueis not working on mobile.Possible solutions
!importantto.euiTableRowCell--isMobileFullWidthso that it overrides inline style widthswidthproperty tomobileOptions, so users can do this instead of usingfullWidth:No strong preference/feelings here on which folks go with - whatever's either easier or feels better API-wise is fine by me!