【发布时间】:2018-02-01 14:44:46
【问题描述】:
我有 2 个参考输入。我想要的是选择一家公司并只显示该公司的分支机构。我试试这个,但它不起作用。 分支机构有一个名为 MotherID 的字段,用于将它们与公司联系起来。
<ReferenceInput source="CompanyID" reference="companies" allowEmpty alwaysOn>
<SelectInput optionText={choice => `${choice.name}`} />
</ReferenceInput>
<DependentInput dependsOn="CompanyID" >
<ReferenceInput source="BranchID" reference="branches" allowEmpty alwaysOn>
<SelectInput optionText={choice => `${choice.tmima +" "+ choice.address}`} />
</ReferenceInput>
</DependentInput>
【问题讨论】:
标签: admin-on-rest