From 8be8128d6e4a9194329ca52d1cb3857c43bf43d0 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 4 Jun 2024 14:55:46 +0200 Subject: [PATCH] Fix returning correct custom value in SelectCustom component --- src/misc/SelectCustom.js | 8 ++++++-- src/misc/modals/Hint.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/misc/SelectCustom.js b/src/misc/SelectCustom.js index 238a5bf..b114a73 100644 --- a/src/misc/SelectCustom.js +++ b/src/misc/SelectCustom.js @@ -41,7 +41,11 @@ export default function Component(props) { isCustom: v === props.customKey ? true : false, }); - props.onChange(event); + props.onChange({ + target: { + value: v === props.customKey ? value.custom : value.value, + }, + }); }; const handleCustomChange = (event) => { @@ -59,7 +63,7 @@ export default function Component(props) { options.push( {o.label} - + , ); } diff --git a/src/misc/modals/Hint.js b/src/misc/modals/Hint.js index 317c034..b486c86 100644 --- a/src/misc/modals/Hint.js +++ b/src/misc/modals/Hint.js @@ -143,7 +143,7 @@ const Streams = function (props) { {props.streams.map((stream, index) => ( - {stream.type} + {stream.type}