From 8068796e62a443ce24e24f73fffeca73cdbc5630 Mon Sep 17 00:00:00 2001 From: AleksMWix Date: Mon, 9 Dec 2024 13:36:37 +0200 Subject: [PATCH 1/2] elements override --- packages/gallery/src/components/item/itemView.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/gallery/src/components/item/itemView.js b/packages/gallery/src/components/item/itemView.js index 843ffdc04..41b6ad484 100644 --- a/packages/gallery/src/components/item/itemView.js +++ b/packages/gallery/src/components/item/itemView.js @@ -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 = ( -
this.onContextMenu(e)} id={cssScrollHelper.getSellectorDomId(this.props)} @@ -1009,7 +1010,7 @@ class ItemView extends React.Component {
{this.getRightInfoElementIfNeeded()} {this.getBottomInfoElementIfNeeded()} - + ); const handleKeyDown = (e) => { /* Relvenat only for Screen-Reader case: From 79bc6be6cd867bf25c2aedb09da6bfad2e7c00b2 Mon Sep 17 00:00:00 2001 From: AleksMWix Date: Mon, 9 Dec 2024 15:21:57 +0200 Subject: [PATCH 2/2] remove ? --- packages/gallery/src/components/item/itemView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gallery/src/components/item/itemView.js b/packages/gallery/src/components/item/itemView.js index 41b6ad484..7ab83a2cf 100644 --- a/packages/gallery/src/components/item/itemView.js +++ b/packages/gallery/src/components/item/itemView.js @@ -958,7 +958,7 @@ 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 Element = this.props.elementsOverride?.item || 'div'; const innerDiv = (