fix: #348, relationship options appearing twice in admin ui

This commit is contained in:
James
2021-10-23 11:34:23 -04:00
parent a0b38f6832
commit b4c15ed3f3

View File

@@ -201,15 +201,6 @@ const Relationship: React.FC<Props> = (props) => {
}
}, [addOptions, api, errorLoading, serverURL]);
// ///////////////////////////
// Get first results
// ///////////////////////////
useEffect(() => {
getResults();
setHasLoadedFirstOptions(true);
}, [addOptions, api, required, relationTo, serverURL, getResults]);
// ///////////////////////////
// Get results when search input changes
// ///////////////////////////
@@ -220,6 +211,7 @@ const Relationship: React.FC<Props> = (props) => {
required,
});
setHasLoadedFirstOptions(true);
setLastLoadedPage(1);
setLastFullyLoadedRelation(-1);
getResults({ search: debouncedSearch });