Add tabindex to DurationInput
This commit is contained in:
parent
c66d688936
commit
33c7e7b28c
1 changed files with 6 additions and 1 deletions
|
|
@ -14,7 +14,10 @@ interface Props
|
||||||
}
|
}
|
||||||
|
|
||||||
const DurationInput = React.forwardRef<HTMLInputElement, Props>(
|
const DurationInput = React.forwardRef<HTMLInputElement, Props>(
|
||||||
function DurationInput({ className, value, onValueChange }, forwardedRef) {
|
function DurationInput(
|
||||||
|
{ className, value, onValueChange, ...props },
|
||||||
|
forwardedRef
|
||||||
|
) {
|
||||||
// State
|
// State
|
||||||
const [duration, setDuration] = useState('')
|
const [duration, setDuration] = useState('')
|
||||||
const [minutesSelected, setMinutesSelected] = useState(false)
|
const [minutesSelected, setMinutesSelected] = useState(false)
|
||||||
|
|
@ -191,6 +194,7 @@ const DurationInput = React.forwardRef<HTMLInputElement, Props>(
|
||||||
onKeyDown={handleKeyDown}
|
onKeyDown={handleKeyDown}
|
||||||
placeholder="mm"
|
placeholder="mm"
|
||||||
size={3}
|
size={3}
|
||||||
|
tabIndex={props.tabIndex}
|
||||||
/>
|
/>
|
||||||
<span>:</span>
|
<span>:</span>
|
||||||
<Input
|
<Input
|
||||||
|
|
@ -208,6 +212,7 @@ const DurationInput = React.forwardRef<HTMLInputElement, Props>(
|
||||||
onKeyDown={handleKeyDown}
|
onKeyDown={handleKeyDown}
|
||||||
placeholder="ss"
|
placeholder="ss"
|
||||||
size={2}
|
size={2}
|
||||||
|
tabIndex={props.tabIndex ? props.tabIndex + 1 : undefined}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue