fixed show master-detail

This commit is contained in:
Jan Prochazka
2020-05-13 07:08:34 +02:00
parent 320471ecc8
commit 99a6b1bb31
2 changed files with 19 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ export default function useFetch({
defaultValue = undefined,
reloadTrigger = undefined,
cacheKey = undefined,
transform = (x) => x,
...config
}) {
const [value, setValue] = React.useState([defaultValue, []]);
@@ -34,7 +35,7 @@ export default function useFetch({
data,
...config,
});
return resp.data;
return transform(resp.data);
}
if (cacheKey) {