8000 feat(Form): Setting up autocomplete in Form. · tabler/tabler-react@cb9d5b6 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit cb9d5b6

Browse files
committed
feat(Form): Setting up autocomplete in Form.
1 parent 313e14a commit cb9d5b6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/Form/Form.react.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export type Props = {|
3737
+className?: string,
3838
+action?: string,
3939
+method?: string,
40+
+autocomplete?: "on" | "off",
4041
|};
4142

4243
function Form({
@@ -45,14 +46,20 @@ function Form({
4546
action,
4647
method,
4748
onSubmit,
49+
autocomplete,
4850
}: Props): React.Node {
51+
// default for autocomplete is "off" if not passed in explicitly
52+
if (!autocomplete) {
53+
autocomplete = "off";
54+
}
4955
const classes = cn(className);
5056
return (
5157
<form
5258
className={classes}
5359
onSubmit={onSubmit}
5460
action={action}
5561
method={method}
62+
autocomplete={autocomplete}
5663
>
5764
{children}
5865
</form>

0 commit comments

Comments
 (0)
0