mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
removed spellcheck from fields that don't need it
This commit is contained in:
@@ -141,6 +141,7 @@ export default function LogInForm() {
|
|||||||
onChange={(e) => setName(e.target.value)}
|
onChange={(e) => setName(e.target.value)}
|
||||||
validate={(v) => (v.trim() === "" ? "Cannot be empty" : undefined)}
|
validate={(v) => (v.trim() === "" ? "Cannot be empty" : undefined)}
|
||||||
submitAttempted={submitAttempted}
|
submitAttempted={submitAttempted}
|
||||||
|
spellcheck={false}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@@ -150,6 +151,7 @@ export default function LogInForm() {
|
|||||||
onChange={(e) => setUsername(e.target.value)}
|
onChange={(e) => setUsername(e.target.value)}
|
||||||
validate={(v) => (v.trim() === "" ? "Cannot be empty" : undefined)}
|
validate={(v) => (v.trim() === "" ? "Cannot be empty" : undefined)}
|
||||||
submitAttempted={submitAttempted}
|
submitAttempted={submitAttempted}
|
||||||
|
spellcheck={false}
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
label="Password"
|
label="Password"
|
||||||
@@ -158,6 +160,7 @@ export default function LogInForm() {
|
|||||||
validate={(v) => (v.trim() === "" ? "Cannot be empty" : undefined)}
|
validate={(v) => (v.trim() === "" ? "Cannot be empty" : undefined)}
|
||||||
hidden={true}
|
hidden={true}
|
||||||
submitAttempted={submitAttempted}
|
submitAttempted={submitAttempted}
|
||||||
|
spellcheck={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ export function ServerConfigurationDialog({ trigger }: { trigger?: ReactNode })
|
|||||||
}}
|
}}
|
||||||
placeholder="https://example.com"
|
placeholder="https://example.com"
|
||||||
className={!isValid ? "border-destructive" : ""}
|
className={!isValid ? "border-destructive" : ""}
|
||||||
|
spellCheck={false}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export function Field({
|
|||||||
placeholder,
|
placeholder,
|
||||||
error,
|
error,
|
||||||
tabIndex,
|
tabIndex,
|
||||||
|
spellcheck,
|
||||||
}: {
|
}: {
|
||||||
label: string;
|
label: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
@@ -22,6 +23,7 @@ export function Field({
|
|||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
error?: string;
|
error?: string;
|
||||||
tabIndex?: number;
|
tabIndex?: number;
|
||||||
|
spellcheck?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const [internalTouched, setInternalTouched] = useState(false);
|
const [internalTouched, setInternalTouched] = useState(false);
|
||||||
const isTouched = submitAttempted || internalTouched;
|
const isTouched = submitAttempted || internalTouched;
|
||||||
@@ -53,6 +55,7 @@ export function Field({
|
|||||||
aria-invalid={error !== undefined || invalidMessage !== ""}
|
aria-invalid={error !== undefined || invalidMessage !== ""}
|
||||||
type={hidden ? "password" : "text"}
|
type={hidden ? "password" : "text"}
|
||||||
tabIndex={tabIndex}
|
tabIndex={tabIndex}
|
||||||
|
spellCheck={spellcheck}
|
||||||
/>
|
/>
|
||||||
<div className="flex items-end justify-end w-full text-xs mb-0 -mt-1">
|
<div className="flex items-end justify-end w-full text-xs mb-0 -mt-1">
|
||||||
{error || invalidMessage !== "" ? (
|
{error || invalidMessage !== "" ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user