Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 868cd9a

Browse files
authored
fix: DEV-3077: Add new property to turn lazyload off (#807)
* fix: DEV-3077: add new property to turn lazyload off * logic adjustment
1 parent 344841d commit 868cd9a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/components/ImageView/ImageView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ export default observer(
893893
item.setImageRef(ref);
894894
this.imageRef.current = ref;
895895
}}
896-
loading={isFF(FF_DEV_3077) && "lazy"}
896+
loading={(isFF(FF_DEV_3077) && !item.lazyoff) && "lazy"}
897897
style={item.imageTransform}
898898
src={item._value}
899899
onLoad={item.updateImageSize}

src/tags/object/Image.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ const TagAttrs = types.model({
8282
crosshair: types.optional(types.boolean, false),
8383
selectioncontrol: types.optional(types.boolean, true),
8484

85+
// this property is just to turn lazyload off to e2e tests
86+
lazyoff: types.optional(types.boolean, false),
87+
8588
horizontalalignment: types.optional(types.enumeration(["left", "center", "right"]), "left"),
8689
verticalalignment: types.optional(types.enumeration(["top", "center", "bottom"]), "top"),
8790
defaultzoom: types.optional(types.enumeration(["auto", "original", "fit"]), "fit"),

0 commit comments

Comments
 (0)