【发布时间】:2022-06-20 19:25:06
【问题描述】:
AdminPanel.tsx
<Resource
options={{ label: 'Transactions' }}
icon={WorkIcon}
name={path}
list={TransactionsList}
/>
TransactionsList.tsx
const PostList = () => (
<ResourceContextProvider value={path}>
<List syncWithLocation {...props}>
<Datagrid >
<FullNameUserField label="User" source="userFirstName" />
<TextField label="Goal Type" source="savingGoalType" />
<TextField label="Goal name" source="savingGoalName" />
<TextField label="Target Amount" source="targetAmount" />
<SavingGoalCreationDateField label="Goal creation date" source="savingGoalCreationDate" />
<TextField label="Strategy Name" source="strategyName" />
<SavingGoalCreationDateField label="Target Date" source="targetDate" />
<TextField label="Status" source="savingGoalStatus" />
</Datagrid>
</List>
</ResourceContextProvider>)
<Tab label="comments" path="comments">
<PostLisst />
</Tab>
我无法显示请求的结果,为什么?
【问题讨论】:
-
这里没有足够的信息来提供答案,请在您实际尝试访问上下文的位置显示代码。还有什么是路径,很多信息都缺乏。
标签: javascript reactjs react-admin