Skip to content

Commit 2186117

Browse files
committed
fix(FormAutocomplete): fix normalizeOptions argument
1 parent 0cd2a35 commit 2186117

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/forms/FormAutocomplete.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ export function FormAutocomplete({
2020
const { isOpen, open, close } = useOpenState();
2121
const [ignoreBlur, setIgnoreBlur] = useState(false);
2222
const [isFocused, setFocus] = useState(false);
23-
const { getValue, setValue, register, isValid, getFormSubmitedAttempted } = useFormControl(name);
23+
const { getValue, setValue, register, isValid, getFormSubmitedAttempted, getFormData } = useFormControl(name);
2424
const registerRef = useCallback(register, []);
2525
const searchInputRef = useRef(null);
2626

27-
const items = normalizeOptions(options, FormData);
27+
const items = normalizeOptions(options, getFormData());
2828
const value = getValue();
2929
const selectedItem = items.find((item) => item.value === value);
3030

0 commit comments

Comments
 (0)