Vocabulary term selector
Implement a new React component to select vocabulary term using autocomplete. The component should display 10 initial values and then use autocomplete.
- The vocabulary is determined by its UUID.
- The field value returned is the term
code
.
<VocabularyTermPicker uuid="21b10067-ba15-44dd-867f-6a18a117fee8" value={ dataset.language } />
API endpoints
Existing API endpoints provide required data:
- GET /api/v0/vocabulary/{UUID}
- POST /api/v0/vocabulary/{UUID}/autocomplete
- POST /api/v0/vocabulary/{UUID}/terms
- GET /api/v0/vocabulary/{UUID}/{code}
See https://api.catalog.demo.genesys-pgr.org/swagger-ui.html#/vocabulary45controller for details.
Application
Apply the new component to select Dataset#language
:
Dataset language should include Spanish (and other languages). Best to use the ISO Language codes Controlled vocabulary at https://catalog.demo.genesys-pgr.org/vocabulary/21b10067-ba15-44dd-867f-6a18a117fee8. The vocabulary has 8036 terms, autocomplete is required.