Skip to content
Permalink
Browse files

fix(datatable): Adjusts styling to account for edited and error cells…

… when row selected (#3167)

* fix(datatable): Adjusts styling to account fro edited and error cells when row is selected

* fix(datatable): Increase specificity of edited cells
  • Loading branch information...
Ayesha Mazumdar authored and brandonferrua committed Mar 22, 2018
1 parent cd98ab6 commit 9ed087a43fde9f1e3ae87fe53f35045f240a5f62
@@ -156,7 +156,7 @@
* @selector .slds-cell-edit
* @restrict .slds-table_edit th, .slds-table_edit td
*/
.slds-cell-edit {
.slds-table .slds-cell-edit {
outline: 0; // @TODO: This came from `has-focus` (watch for overreaching)

&.slds-has-focus { // This is the focused state
@@ -321,6 +321,35 @@ export let states = [
</Container>
)
},
{
id: 'row-selected-with-edited-cell',
label: 'Row Selected with an Edited Cell',
element: (
<Container>
<Table isEditable style={{ width: '66.75rem' }}>
<Thead
actionableMode
columns={columns}
hasErrorColumn
mainColumnWidth="8.75rem"
/>
<tbody>
{_.times(rows.length, i => (
<InlineEditTr
key={i}
index={i + 1}
className={i === 0 ? 'slds-is-selected' : null}
{...rows[i]}
rowSelected={i === 0 ? true : null}
actionableMode
showEditedCell
/>
))}
</tbody>
</Table>
</Container>
)
},
{
id: 'row-error',
label: 'Error - Row level on save (Actionable mode)',
@@ -354,6 +383,37 @@ export let states = [
document.getElementById('button-01').focus()
`
},
{
id: 'row-error-and-selected',
label:
'Error - Row level on save (Actionable mode) with entire row selected',
element: (
<Container>
<Table isEditable style={{ width: '66.75rem' }}>
<Thead
actionableMode
columns={columns}
hasErrorColumn
mainColumnWidth="8.75rem"
/>
<tbody>
{_.times(rows.length, i => (
<InlineEditTr
key={i}
index={i + 1}
className={i === 0 ? 'slds-is-selected' : null}
{...rows[i]}
rowSelected={i === 0 ? true : null}
actionableMode
showCellError
showRowError
/>
))}
</tbody>
</Table>
</Container>
)
},
{
id: 'row-error-focused',
label: 'Error indicator - Focused (Actionable mode)',

0 comments on commit 9ed087a

Please sign in to comment.
You can’t perform that action at this time.