Skip to content

Commit

Permalink
2165: Fixed issue where change order of slides was not persisted
Browse files Browse the repository at this point in the history
  • Loading branch information
tuj committed Aug 28, 2024
1 parent 4d5ddd5 commit e03d85b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/util/multi-and-table/select-slides-table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"]);

Expand All @@ -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"]);

Expand Down

0 comments on commit e03d85b

Please sign in to comment.