Skip to content

Commit cccd7f3

Browse files
committed
comments
1 parent 715c427 commit cccd7f3

File tree

1 file changed

+6
-0
lines changed
  • src/components/ProjectForm/GroupsFormField

1 file changed

+6
-0
lines changed

src/components/ProjectForm/GroupsFormField/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import { fetchGroups as fetchGroupsApi } from '../../../services/challenges'
66
import { AUTOCOMPLETE_DEBOUNCE_TIME_MS } from '../../../config/constants'
77
import { useMapSelectedGroups } from './use-map-selected-groups.hook'
88

9+
/**
10+
* Search & fetch groups from api, filtering by group name
11+
*/
912
const fetchGroups = debounce((inputValue, callback) => {
1013
fetchGroupsApi({ name: inputValue })
1114
.then(groups => {
@@ -20,6 +23,9 @@ const fetchGroups = debounce((inputValue, callback) => {
2023
})
2124
}, AUTOCOMPLETE_DEBOUNCE_TIME_MS)
2225

26+
/**
27+
* Component to handle project groups
28+
*/
2329
const GroupsFormField = ({ value, name, onBlur, onChange, id, placeholder, ref }) => {
2430
const selectedGroups = useMapSelectedGroups(value)
2531

0 commit comments

Comments
 (0)