chore: temporarily halt full form validation
This commit is contained in:
parent
6e514a9064
commit
f7c9a14e92
@ -122,9 +122,7 @@ function Panel(props: DialogPanelProps) {
|
|||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
variant={variant === 'destructive' ? 'danger' : 'heavy'}
|
variant={variant === 'destructive' ? 'danger' : 'heavy'}
|
||||||
isDisabled={
|
isDisabled={isDisabled}
|
||||||
isDisabled || !(ref.current?.checkValidity() ?? true)
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
Confirm
|
Confirm
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import { Asterisk } from 'lucide-react';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
import { type AriaTextFieldProps, useId, useTextField } from 'react-aria';
|
import { type AriaTextFieldProps, useId, useTextField } from 'react-aria';
|
||||||
import cn from '~/utils/cn';
|
import cn from '~/utils/cn';
|
||||||
@ -9,6 +10,7 @@ export interface InputProps extends AriaTextFieldProps<HTMLInputElement> {
|
|||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Custom isInvalid logic for custom error messages
|
||||||
export default function Input(props: InputProps) {
|
export default function Input(props: InputProps) {
|
||||||
const { label, labelHidden, className } = props;
|
const { label, labelHidden, className } = props;
|
||||||
const ref = useRef<HTMLInputElement | null>(null);
|
const ref = useRef<HTMLInputElement | null>(null);
|
||||||
@ -42,6 +44,9 @@ export default function Input(props: InputProps) {
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
|
{props.isRequired && (
|
||||||
|
<Asterisk className="inline w-3.5 text-red-500 pb-1 ml-0.5" />
|
||||||
|
)}
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
{...inputProps}
|
{...inputProps}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user