mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
refactor(web/input): default select to first option
This commit is contained in:
@@ -13,7 +13,7 @@ const SelectField: React.FC<Props> = (props) => {
|
|||||||
const controller = useController({
|
const controller = useController({
|
||||||
name: `test.${props.index}.value`,
|
name: `test.${props.index}.value`,
|
||||||
control: props.control,
|
control: props.control,
|
||||||
defaultValue: props.row.default,
|
defaultValue: props.row.default || props.row.options[0].value,
|
||||||
rules: { required: props.row.required },
|
rules: { required: props.row.required },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
||||||
import { SelectItem } from '@mantine/core';
|
|
||||||
|
|
||||||
export interface IInput {
|
export interface IInput {
|
||||||
type: 'input';
|
type: 'input';
|
||||||
|
|||||||
Reference in New Issue
Block a user