commit 3bfa24f87f391c87c7a729a6e1df8ee3c0d006d1
parent a5b8e22e2fd9985c03c599a6623add3351e6fe67
Author: Agastya Chandrakant <me@hanabi.in>
Date: Mon, 18 May 2020 13:10:09 +0530
autofocus boolean
Diffstat:
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/comp/autoCompleteText.js b/src/comp/autoCompleteText.js
@@ -1,7 +1,13 @@
import React from 'react';
import moment from 'moment-timezone';
-function AutoCompleteText({ changeValue, defaultValue = '', id, placeholder }) {
+function AutoCompleteText({
+ autofocus = false,
+ changeValue,
+ defaultValue = '',
+ id,
+ placeholder,
+}) {
const options = moment.tz
.names()
.sort()
@@ -35,7 +41,7 @@ function AutoCompleteText({ changeValue, defaultValue = '', id, placeholder }) {
<h4 aria-level="4" id="converted-time-lbl">
<input
role="searchbox"
- autoFocus
+ autoFocus={autofocus}
className="w-75"
id={id}
name="converted-time-lbl-input"