Skip to content

Commit

Permalink
fix(inventoryList): issues/476 show field on zero results (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Feb 16, 2021
1 parent adb9d33 commit ea9b42f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ exports[`InventoryList Component should handle variations in data: filtered data
viewId="inventoryList"
/>
</CardHeaderMain>
<CardActions>
<CardActions
aria-hidden={false}
className=""
>
<Pagination
dropDirection="down"
isCompact={true}
Expand Down Expand Up @@ -352,7 +355,10 @@ exports[`InventoryList Component should handle variations in data: variable data
viewId="inventoryList"
/>
</CardHeaderMain>
<CardActions>
<CardActions
aria-hidden={false}
className=""
>
<Pagination
dropDirection="down"
isCompact={true}
Expand Down Expand Up @@ -454,8 +460,8 @@ exports[`InventoryList Component should render a non-connected component: non-co
updateOnResize={true}
>
<CardHeader
aria-hidden={true}
className="transparent"
aria-hidden={false}
className=""
>
<CardHeaderMain>
<ToolbarFieldDisplayName
Expand All @@ -464,7 +470,10 @@ exports[`InventoryList Component should render a non-connected component: non-co
viewId="inventoryList"
/>
</CardHeaderMain>
<CardActions>
<CardActions
aria-hidden={true}
className="transparent"
>
<Pagination
dropDirection="down"
isCompact={true}
Expand Down
7 changes: 2 additions & 5 deletions src/components/inventoryList/inventoryList.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,11 @@ class InventoryList extends React.Component {
return (
<Card className="curiosity-inventory-card">
<MinHeight key="headerMinHeight" updateOnContent>
<CardHeader
className={(error && 'hidden') || (!itemCount && 'transparent') || ''}
aria-hidden={error || !itemCount || false}
>
<CardHeader className={(error && 'hidden') || ''} aria-hidden={error || false}>
<CardHeaderMain>
<ToolbarFieldDisplayName viewId={viewId} />
</CardHeaderMain>
<CardActions>
<CardActions className={(!itemCount && 'transparent') || ''} aria-hidden={!itemCount || false}>
<Pagination
isCompact
isDisabled={pending || error}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ exports[`InventorySubscriptions Component should handle variations in data: filt
aria-hidden={false}
className=""
>
<CardActions>
<CardActions
aria-hidden={false}
className=""
>
<Pagination
dropDirection="down"
isCompact={true}
Expand Down Expand Up @@ -229,7 +232,10 @@ exports[`InventorySubscriptions Component should handle variations in data: vari
aria-hidden={false}
className=""
>
<CardActions>
<CardActions
aria-hidden={false}
className=""
>
<Pagination
dropDirection="down"
isCompact={true}
Expand Down Expand Up @@ -329,10 +335,13 @@ exports[`InventorySubscriptions Component should render a non-connected componen
updateOnResize={true}
>
<CardHeader
aria-hidden={true}
className="transparent"
aria-hidden={false}
className=""
>
<CardActions>
<CardActions
aria-hidden={true}
className="transparent"
>
<Pagination
dropDirection="down"
isCompact={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,8 @@ class InventorySubscriptions extends React.Component {
return (
<Card className="curiosity-inventory-card">
<MinHeight key="headerMinHeight" updateOnContent>
<CardHeader
className={(error && 'hidden') || (!itemCount && 'transparent') || ''}
aria-hidden={error || !itemCount || false}
>
<CardActions>
<CardHeader className={(error && 'hidden') || ''} aria-hidden={error || false}>
<CardActions className={(!itemCount && 'transparent') || ''} aria-hidden={!itemCount || false}>
<Pagination
isCompact
isDisabled={pending || error}
Expand Down

0 comments on commit ea9b42f

Please sign in to comment.