Adjust autocomplete batch size
This commit is contained in:
parent
54b71dea19
commit
6af0f62fc9
|
@ -170,7 +170,7 @@ const useDb = () => {
|
|||
|
||||
const autocomplete = async (attribute: string, search: string): Promise<TunesResponse[]> => {
|
||||
try {
|
||||
const items = await tunesCollection.getFullList<TunesResponse>(10, {
|
||||
const items = await tunesCollection.getFullList<TunesResponse>({
|
||||
filter: `${attribute} ~ "${search}"`,
|
||||
});
|
||||
|
||||
|
|
|
@ -148,8 +148,6 @@ const UploadPage = () => {
|
|||
}
|
||||
|
||||
const options = (await autocomplete(attribute, search)).map((record) => record[attribute]);
|
||||
|
||||
// TODO: order by occurrence (more common - higher in the list)
|
||||
const unique = [...new Set(options)].map((value) => ({ value }));
|
||||
|
||||
setAutocompleteOptions((prev) => ({ ...prev, [attribute]: unique }));
|
||||
|
|
Loading…
Reference in New Issue