Web: Files: ThirdPartyComboBox: fixed selectedOption

This commit is contained in:
Nikita Gopienko 2024-04-15 17:05:07 +03:00
parent ac1236fe47
commit 0b869ea6c1

View File

@ -159,9 +159,10 @@ const ThirdPartyComboBox = ({
}));
const onSelect = (elem) => {
const thirdparty = thirdparties.find(
(t) => elem.key === t.id || elem.key === t.category,
);
const thirdparty = thirdparties.find((t) => {
if (t.category) return elem.key === t.category;
else return elem.key === t.id;
});
thirdparty && setStorageLocaiton(thirdparty);
};