Skip to content

Commit

Permalink
Merge pull request #257 from os2display/feature/2314-multidropdown-fix
Browse files Browse the repository at this point in the history
2314: update multi select component, change key in remove duplicates …
  • Loading branch information
tuj authored Sep 18, 2024
2 parents 1914ffb + d34f656 commit 1332cd0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

- [#256](https://github.com/os2display/display-admin-client/pull/257)
- Update multiselect component
- Change key in function from `id` to `@id`
- [#256](https://github.com/os2display/display-admin-client/pull/256)
- Fixed published from/to texts.
- [#255](https://github.com/os2display/display-admin-client/pull/255)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"react-dropzone": "^11.4.2",
"react-i18next": "^11.16.1",
"react-images-uploading": "^3.1.2",
"react-multi-select-component": "^4.1.12",
"react-multi-select-component": "^4.3.4",
"react-paginate": "^8.1.3",
"react-quill": "^2.0.0",
"react-redux": "^7.2.5",
Expand Down
8 changes: 4 additions & 4 deletions src/components/screen/screen-manager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ function ScreenManager({
const { t } = useTranslation("common", { keyPrefix: "screen-manager" });
const navigate = useNavigate();
const [orientationOptions] = useState([
{ title: "Vertikal", id: "vertical" },
{ title: "Horisontal", id: "horizontal" },
{ title: "Vertikal", "@id": "vertical" },
{ title: "Horisontal", "@id": "horizontal" },
]);
const [resolutionOptions] = useState([
{ title: "4K", id: "4K" },
{ title: "HD", id: "HD" },
{ title: "4K", "@id": "4K" },
{ title: "HD", "@id": "HD" },
]);
const headerText =
saveMethod === "PUT" ? t("edit-screen-header") : t("create-screen-header");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function MultiSelectComponent({
[...selected, ...options].filter((option) =>
idsOfSelectedEntries.includes(option["@id"] || option.id)
),
"id"
"@id"
);

if (singleSelect) {
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4141,9 +4141,9 @@ react-lifecycles-compat@^3.0.4:
resolved "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz"
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==

react-multi-select-component@^4.1.12:
react-multi-select-component@^4.3.4:
version "4.3.4"
resolved "https://registry.npmjs.org/react-multi-select-component/-/react-multi-select-component-4.3.4.tgz"
resolved "https://registry.yarnpkg.com/react-multi-select-component/-/react-multi-select-component-4.3.4.tgz#4f4b354bfa1f0353fa9c3bccf8178c87c9780450"
integrity sha512-Ui/bzCbROF4WfKq3OKWyQJHmy/bd1mW7CQM+L83TfiltuVvHElhKEyPM3JzO9urIcWplBUKv+kyxqmEnd9jPcA==

react-overlays@^5.1.2:
Expand Down

0 comments on commit 1332cd0

Please sign in to comment.