Skip to content

Commit

Permalink
fix(inventoryList): issues/476 hide field on zero results (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Feb 16, 2021
1 parent 6a47860 commit a0f7047
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ exports[`InventoryList Component should handle variations in data: filtered data
updateOnResize={true}
>
<CardHeader
className=""
className="transparent"
>
<CardHeaderMain>
<ToolbarFieldDisplayName
Expand Down Expand Up @@ -340,7 +340,7 @@ exports[`InventoryList Component should handle variations in data: variable data
updateOnResize={true}
>
<CardHeader
className=""
className="transparent"
>
<CardHeaderMain>
<ToolbarFieldDisplayName
Expand Down Expand Up @@ -450,7 +450,7 @@ exports[`InventoryList Component should render a non-connected component: non-co
updateOnResize={true}
>
<CardHeader
className=""
className="transparent"
>
<CardHeaderMain>
<ToolbarFieldDisplayName
Expand Down
2 changes: 1 addition & 1 deletion src/components/inventoryList/inventoryList.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class InventoryList extends React.Component {
return (
<Card className="curiosity-inventory-card">
<MinHeight key="headerMinHeight" updateOnContent>
<CardHeader className={(error && 'hidden') || ''}>
<CardHeader className={(error && 'hidden') || (!itemCount && 'transparent') || ''}>
<CardHeaderMain>
<ToolbarFieldDisplayName viewId={viewId} />
</CardHeaderMain>
Expand Down
4 changes: 4 additions & 0 deletions src/styles/_fade.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@
height:1px;
overflow:hidden;
}

.transparent {
opacity: 0;
}
}

0 comments on commit a0f7047

Please sign in to comment.