Skip to content

Commit

Permalink
Account for lack of actions
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Apr 30, 2024
1 parent 07756c7 commit 2f42280
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions packages/dataviews/src/view-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,21 +117,23 @@ function ListItem( {
</HStack>
</CompositeItem>
</div>
<div role="gridcell">
<CompositeItem
// To be able to pass ItemActions directly, it should pass the incoming props to the underlying element:
// https://ariakit.org/guide/composition#custom-components-must-be-open-for-extension
render={ ( props ) => (
<ItemActions
actions={ props.actions }
item={ props.item }
isCompact
/>
) }
item={ item }
actions={ actions }
/>
</div>
{ actions && (
<div role="gridcell">
<CompositeItem
// To be able to pass ItemActions directly, it should pass the incoming props to the underlying element:
// https://ariakit.org/guide/composition#custom-components-must-be-open-for-extension
render={ ( props ) => (
<ItemActions
actions={ props.actions }
item={ props.item }
isCompact
/>
) }
item={ item }
actions={ actions }
/>
</div>
) }
</HStack>
</CompositeRow>
);
Expand Down

0 comments on commit 2f42280

Please sign in to comment.