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>(
|
||||
function DurationInput({ className, value, onValueChange }, forwardedRef) {
|
||||
function DurationInput(
|
||||
{ className, value, onValueChange, ...props },
|
||||
forwardedRef
|
||||
) {
|
||||
// State
|
||||
const [duration, setDuration] = useState('')
|
||||
const [minutesSelected, setMinutesSelected] = useState(false)
|
||||
|
|
@ -191,6 +194,7 @@ const DurationInput = React.forwardRef<HTMLInputElement, Props>(
|
|||
onKeyDown={handleKeyDown}
|
||||
placeholder="mm"
|
||||
size={3}
|
||||
tabIndex={props.tabIndex}
|
||||
/>
|
||||
<span>:</span>
|
||||
<Input
|
||||
|
|
@ -208,6 +212,7 @@ const DurationInput = React.forwardRef<HTMLInputElement, Props>(
|
|||
onKeyDown={handleKeyDown}
|
||||
placeholder="ss"
|
||||
size={2}
|
||||
tabIndex={props.tabIndex ? props.tabIndex + 1 : undefined}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue