Add dynamic value to input

This commit is contained in:
Tilen Komel
2024-08-29 23:16:02 +02:00
parent cd0056783c
commit 06c20fa950
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -31,7 +31,7 @@ export interface InputProps
}
const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, variant, prefix, suffix, action, ...props }, ref) => {
({ className, value, variant, prefix, suffix, action, ...props }, ref) => {
return (
<div className="relative w-full">
{prefix && (
@@ -45,6 +45,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
className,
inputVariants({ variant }),
)}
value={value}
ref={ref}
{...props}
/>