User Input
Allows you to select a user (or users) from a list of users in the system.
Example
import { UserInput } from "@/components/user/inputs/user-input";
return (
<FormField
control={form.control}
name="user"
render={({ field }) => (
<FormItem>
<FormLabel>{t("create_edit.type.user")}</FormLabel>
<UserInput {...field} />
<FormMessage />
</FormItem>
)}
/>
);
Props
Name | Type | Default | Description |
---|---|---|---|
value (Required) | {id: number; name: string;} | The value of the user input. | |
multiple | boolean | false | Allow multiple users to be selected. |