Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/autocomplete/autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}

export const Autocomplete = (props: AutocompleteProps) => {
const items = (props.items || []).map((item) => {
const items = (props.items || []).map((item): NormalizedOption => {
if (typeof item === 'string') {
return {value: item, label: item};
} else {
Expand Down Expand Up @@ -138,7 +138,7 @@

useEffect(() => {
props.autoCompleteRef?.(apiRef.current);
}, [props.autoCompleteRef]);

Check warning on line 141 in src/components/autocomplete/autocomplete.tsx

View workflow job for this annotation

GitHub Actions / build

React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect
const setInputRef = useCallback((node: HTMLInputElement | null) => {
inputRef.current = node;
}, []);
Expand Down
Loading