Skip to content

Commit

Permalink
fix: Correcty useGetList parameters and record adding
Browse files Browse the repository at this point in the history
  • Loading branch information
mguihal committed Sep 18, 2023
1 parent 17fb04a commit c25bb24
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/frontend/packages/semantic-data-provider/dist/index.es.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useGetList } from 'react-admin';
import { useGetList, useRecordContext } from 'react-admin';
import { default as FilterHandler } from './FilterHandler';

/*
Expand Down Expand Up @@ -71,10 +71,8 @@ const GroupedReferenceHandler = ({
filterProperty,
...otherProps
}) => {
const { data } = useGetList({
resource: groupReference,
payload: {}
});
const record = useRecordContext();
const { data } = useGetList(groupReference);

return (
<>
Expand All @@ -84,7 +82,7 @@ const GroupedReferenceHandler = ({
return (
<>
{groupHeader && groupHeader({ ...otherProps, group: data })}
<FilterHandler {...otherProps} filter={filter} label={data[groupLabel]}>
<FilterHandler {...otherProps} record={record} filter={filter} label={data[groupLabel]}>
{children}
</FilterHandler>
</>
Expand Down

0 comments on commit c25bb24

Please sign in to comment.