@stoker-platform/web-app 0.5.216 → 0.5.217
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/Images.tsx +1 -1
- package/src/utils/getFormattedFieldValue.tsx +2 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/Images.tsx
CHANGED
|
@@ -381,7 +381,7 @@ const Row = ({ index, style, data }: RowProps) => {
|
|
|
381
381
|
</div>
|
|
382
382
|
</div>
|
|
383
383
|
)}
|
|
384
|
-
<div className={cn("grid", "gap-4", size)}>
|
|
384
|
+
<div className={cn("grid", "gap-4", "auto-rows-fr", size)}>
|
|
385
385
|
{record[imagesConfig.imageField] ? (
|
|
386
386
|
<CopyImageOverlay src={record[imagesConfig.imageField]} className="w-full h-full">
|
|
387
387
|
<button
|
|
@@ -14,7 +14,7 @@ import { Check, X } from "lucide-react"
|
|
|
14
14
|
import { LoadingSpinner } from "@/components/ui/loading-spinner"
|
|
15
15
|
import { Button } from "@/components/ui/button"
|
|
16
16
|
import { preloadCacheEnabled } from "./preloadCacheEnabled"
|
|
17
|
-
import {
|
|
17
|
+
import { useLayoutEffect, useRef, useState } from "react"
|
|
18
18
|
import { cn } from "@/lib/utils"
|
|
19
19
|
import { getSafeUrl } from "./isSafeUrl"
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ const FormattedFieldImage = ({ src, alt, form }: { src: string; alt?: string; fo
|
|
|
23
23
|
const [loadedSrc, setLoadedSrc] = useState<string | null>(null)
|
|
24
24
|
const isLoaded = loadedSrc === src
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
useLayoutEffect(() => {
|
|
27
27
|
if (imgRef.current?.complete && imgRef.current.naturalWidth > 0) {
|
|
28
28
|
setLoadedSrc(src)
|
|
29
29
|
}
|