Fix relation search: fetch limit=500 instead of 20 for client-side filtering

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-21 22:48:52 +02:00
parent a02705734d
commit bdf3bd590e

View File

@@ -126,7 +126,7 @@ function RelationManager({ recordId, rel }) {
if (!search.trim()) { setSearchResults([]); return; } if (!search.trim()) { setSearchResults([]); return; }
const timer = setTimeout(() => { const timer = setTimeout(() => {
setSearching(true); setSearching(true);
apiFetch(`${rel.searchEndpoint}?limit=20&offset=0`) apiFetch(`${rel.searchEndpoint}?limit=500&offset=0`)
.then(data => { .then(data => {
const arr = Array.isArray(data) ? data : []; const arr = Array.isArray(data) ? data : [];
const q = search.toLowerCase(); const q = search.toLowerCase();