fixing eslint errors

This commit is contained in:
Mose Müller
2023-10-30 14:14:32 +01:00
parent b149c1b411
commit 1d2325171b
3 changed files with 6 additions and 5 deletions

View File

@ -62,7 +62,7 @@ export const ColouredEnumComponent = React.memo((props: ColouredEnumComponentPro
value={value} value={value}
style={{ backgroundColor: enumDict[value] }} style={{ backgroundColor: enumDict[value] }}
onChange={(event) => handleValueChange(event.target.value)}> onChange={(event) => handleValueChange(event.target.value)}>
{Object.entries(enumDict).map(([key, val]) => ( {Object.entries(enumDict).map(([key]) => (
<option key={key} value={key}> <option key={key} value={key}>
{key} {key}
</option> </option>

View File

@ -31,8 +31,8 @@ interface NumberComponentProps {
const handleArrowKey = ( const handleArrowKey = (
key: string, key: string,
value: string, value: string,
selectionStart: number, selectionStart: number
selectionEnd: number // selectionEnd: number
) => { ) => {
// Split the input value into the integer part and decimal part // Split the input value into the integer part and decimal part
const parts = value.split('.'); const parts = value.split('.');
@ -234,8 +234,8 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => {
({ value: newValue, selectionStart } = handleArrowKey( ({ value: newValue, selectionStart } = handleArrowKey(
key, key,
value, value,
selectionStart, selectionStart
selectionEnd // selectionEnd
)); ));
} else if (key === 'Backspace') { } else if (key === 'Backspace') {
({ value: newValue, selectionStart } = handleBackspaceKey( ({ value: newValue, selectionStart } = handleBackspaceKey(

View File

@ -147,6 +147,7 @@ export const SliderComponent = React.memo((props: SliderComponentProps) => {
</Col> </Col>
<Col xs="auto"> <Col xs="auto">
<ToggleButton <ToggleButton
id={`button-${id}`}
onClick={() => setOpen(!open)} onClick={() => setOpen(!open)}
type="checkbox" type="checkbox"
checked={open} checked={open}