Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2314: update multi select component, change key in remove duplicates … #257

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading