Add autocomplete attribute to Input component
This commit is contained in:
parent
f1a56b9f91
commit
64d8b75f3e
2 changed files with 4 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ const {
|
|||
placeholder,
|
||||
className,
|
||||
defaultStyles = true,
|
||||
autocomplete = "on",
|
||||
} = Astro.props;
|
||||
|
||||
const styleList = className ? className.split(" ") : [];
|
||||
|
|
@ -21,6 +22,7 @@ interface Props {
|
|||
placeholder?: string;
|
||||
className?: string;
|
||||
defaultStyles?: boolean;
|
||||
autocomplete?: string;
|
||||
}
|
||||
---
|
||||
|
||||
|
|
@ -31,4 +33,5 @@ interface Props {
|
|||
value={defaultTextContent || ""}
|
||||
type="text"
|
||||
class={styleList.map((style) => style).join(" ")}
|
||||
autocomplete={autocomplete}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ export function getStaticPaths() {
|
|||
placeholder={t("menu.search")}
|
||||
defaultStyles={false}
|
||||
transition:persist
|
||||
autocomplete="off"
|
||||
/>
|
||||
<div id="search-suggestions"></div>
|
||||
<div id="loading-content">Loading...</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue