Skip to content

Commit

Permalink
Fix returning correct custom value in SelectCustom component
Browse files Browse the repository at this point in the history
  • Loading branch information
ioppermann committed Jun 4, 2024
1 parent 88826db commit 8be8128
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/misc/SelectCustom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -59,7 +63,7 @@ export default function Component(props) {
options.push(
<MenuItem key={o.value} value={o.value} disabled={o.disabled === true}>
{o.label}
</MenuItem>
</MenuItem>,
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/misc/modals/Hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const Streams = function (props) {
{props.streams.map((stream, index) => (
<Grid key={stream.index + ':' + stream.stream} item xs={12}>
<Stack>
<Typography sx={{textTransform: "UPPERCASE", marginBottom: 2}} >{stream.type}</Typography>
<Typography sx={{ textTransform: 'UPPERCASE', marginBottom: 2 }}>{stream.type}</Typography>
<Stream stream={stream} onChange={handleChange(index)} />
</Stack>
</Grid>
Expand Down

0 comments on commit 8be8128

Please sign in to comment.