diff --git a/striker-ui/components/CrudList.tsx b/striker-ui/components/CrudList.tsx index 08ebb78e..3d94f310 100644 --- a/striker-ui/components/CrudList.tsx +++ b/striker-ui/components/CrudList.tsx @@ -39,6 +39,8 @@ const CrudList = < renderDeleteItem, renderEditForm, renderListItem, + // Dependents + entryUrlPrefix = entriesUrl, } = props; const addDialogRef = useRef(null); @@ -72,7 +74,7 @@ const CrudList = < const { fetch: getEntry, loading: loadingEntry } = useActiveFetch({ onData: (data) => setEntry(data), - url: entriesUrl, + url: entryUrlPrefix, }); const addHeader = useMemo( diff --git a/striker-ui/types/CrudList.d.ts b/striker-ui/types/CrudList.d.ts index 7247dc1e..fca66469 100644 --- a/striker-ui/types/CrudList.d.ts +++ b/striker-ui/types/CrudList.d.ts @@ -24,6 +24,7 @@ type DeletePromiseChainGetter = ( ) => Promise[]; type CrudListOptionalProps = { + entryUrlPrefix?: string; getAddLoading?: (previous?: boolean) => boolean; getDeletePromiseChain?: ( base: DeletePromiseChainGetter,