mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06: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({
|
||||
name: `test.${props.index}.value`,
|
||||
control: props.control,
|
||||
defaultValue: props.row.default,
|
||||
defaultValue: props.row.default || props.row.options[0].value,
|
||||
rules: { required: props.row.required },
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
||||
import { SelectItem } from '@mantine/core';
|
||||
|
||||
export interface IInput {
|
||||
type: 'input';
|
||||
|
||||
Reference in New Issue
Block a user