Skip to content

Commit

Permalink
Merge pull request #1302 from wix-incubator/v5ElementsOverride
Browse files Browse the repository at this point in the history
use ElementsOverride.items for overriding element in itemView
  • Loading branch information
AleksMWix authored Dec 9, 2024
2 parents 65ccdc6 + 79bc6be commit 7bfbcf4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/gallery/src/components/item/itemView.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,8 +958,9 @@ class ItemView extends React.Component {
options[optionsMap.layoutParams.info.placement] !==
GALLERY_CONSTS[optionsMap.layoutParams.info.placement].OVERLAY && !this.hasRequiredMediaUrl;
const itemAriaRole = this.getItemAriaRole();
const Element = this.props.elementsOverride?.item || 'div';
const innerDiv = (
<div
<Element
className={this.getItemContainerClass()}
onContextMenu={(e) => this.onContextMenu(e)}
id={cssScrollHelper.getSellectorDomId(this.props)}
Expand Down Expand Up @@ -1009,7 +1010,7 @@ class ItemView extends React.Component {
</div>
{this.getRightInfoElementIfNeeded()}
{this.getBottomInfoElementIfNeeded()}
</div>
</Element>
);
const handleKeyDown = (e) => {
/* Relvenat only for Screen-Reader case:
Expand Down

0 comments on commit 7bfbcf4

Please sign in to comment.