@stoker-platform/web-app 0.5.191 → 0.5.192
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/Form.tsx +10 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/Form.tsx
CHANGED
|
@@ -3713,6 +3713,15 @@ function RecordForm({
|
|
|
3713
3713
|
useEffect(() => {
|
|
3714
3714
|
const loadImages = async () => {
|
|
3715
3715
|
if (!formImagesEnabled || operation !== "update" || !record || isOffline) return
|
|
3716
|
+
const imageFieldUrls = fields
|
|
3717
|
+
.filter((field) => {
|
|
3718
|
+
if (field.type !== "String") return false
|
|
3719
|
+
const fieldCustomization = getFieldCustomization(field, customization)
|
|
3720
|
+
return tryFunction(fieldCustomization.admin?.image)
|
|
3721
|
+
})
|
|
3722
|
+
.map((field) => {
|
|
3723
|
+
return record?.[field.name]
|
|
3724
|
+
})
|
|
3716
3725
|
try {
|
|
3717
3726
|
const items = await getFiles("", record)
|
|
3718
3727
|
const imageItems = items.filter((item) => {
|
|
@@ -3724,7 +3733,7 @@ function RecordForm({
|
|
|
3724
3733
|
return url
|
|
3725
3734
|
}),
|
|
3726
3735
|
)
|
|
3727
|
-
setCarouselImages(urls)
|
|
3736
|
+
setCarouselImages(urls.filter((url) => !imageFieldUrls.includes(url)))
|
|
3728
3737
|
} finally {
|
|
3729
3738
|
setCarouselLoading(false)
|
|
3730
3739
|
}
|