fix: when finished pairing a machine open the machine status page with

this machine expanded

refactor: simplify add machine page
This commit is contained in:
Liordino Neto 2020-10-15 15:27:48 -03:00 committed by Josh Harvey
parent c56d4759bd
commit 20370fcd1d
5 changed files with 39 additions and 44 deletions

View file

@ -92,6 +92,7 @@ const DataTable = ({
Details,
className,
expandable,
shouldStartExpanded,
onClick,
...props
}) => {
@ -128,7 +129,10 @@ const DataTable = ({
elements={elements}
data={data[index]}
Details={Details}
expanded={index === expanded}
expanded={
index === expanded ||
(shouldStartExpanded && shouldStartExpanded(data[index]))
}
expandRow={expandRow}
expandable={expandable}
onClick={onClick}