Function: useTagSuggestions()
useTagSuggestions(
query,options):UseQueryResult<object[],Error>
Defined in: web/lib/hooks/use-tags.ts:227
Fetches tag suggestions based on a query.
Parameters
query
string
Search query for suggestions
options
UseTagsOptions = {}
Hook options
Returns
UseQueryResult<object[], Error>
Query result with tag suggestions
Remarks
Uses the TaxoFolk system to provide intelligent suggestions from:
- Tag co-occurrence patterns
- Authority record matching
- Facet value matching
Suggestions include confidence scores and source indicators.
Example
const { data: suggestions } = useTagSuggestions(inputValue, {
enabled: inputValue.length >= 2,
});
return (
<TagSuggestionList
suggestions={suggestions ?? []}
onSelect={handleSelectSuggestion}
/>
);