Skip to content

Commit 0f67bf2

Browse files
Add autoFocus prop to Input (#35)
1 parent 2676db9 commit 0f67bf2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Lumi/Components/Input.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ displayStep (Step e) = show e
9292
type InputProps =
9393
{ "type" :: String
9494
, autoComplete :: String
95+
, autoFocus :: Boolean
9596
, checked :: CheckboxState
9697
, disabled :: Boolean
9798
, max :: Nullable Number
@@ -125,6 +126,7 @@ input = makeStateless component $ element lumiInputElement <<< mapProps
125126
, "data-variant": show props.variant
126127
, "type": props."type"
127128
, autoComplete: props.autoComplete
129+
, autoFocus: props.autoFocus
128130
, checked: props.checked == On
129131
, className: "lumi"
130132
, disabled: props.disabled
@@ -149,6 +151,7 @@ text_ :: InputProps
149151
text_ =
150152
{ "type": "text"
151153
, autoComplete: "on"
154+
, autoFocus: false
152155
, checked: Off
153156
, disabled: false
154157
, max: toNullable Nothing

0 commit comments

Comments
 (0)