From e03d85ba7b3ef7d0faa4124f2a157154ae1fd7c0 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:40:00 +0200 Subject: [PATCH] 2165: Fixed issue where change order of slides was not persisted --- .../util/multi-and-table/select-slides-table.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/util/multi-and-table/select-slides-table.jsx b/src/components/util/multi-and-table/select-slides-table.jsx index 15397d6a..a716cfcc 100644 --- a/src/components/util/multi-and-table/select-slides-table.jsx +++ b/src/components/util/multi-and-table/select-slides-table.jsx @@ -68,6 +68,12 @@ function SelectSlidesTable({ handleChange, name, slideId = "" }) { const newData = [...expired, ...active, ...future]; setSelectedData(newData); + const target = { + value: newData.map((item) => item["@id"]), + id: name, + }; + handleChange({ target }); + const order = selectedData.map((entry) => entry["@id"]); const newOrder = newData.map((entry) => entry["@id"]); @@ -92,6 +98,12 @@ function SelectSlidesTable({ handleChange, name, slideId = "" }) { setSelectedData(newData); + const target = { + value: newData.map((item) => item["@id"]), + id: name, + }; + handleChange({ target }); + const order = selectedData.map((entry) => entry["@id"]); const newOrder = newData.map((entry) => entry["@id"]);