【问题标题】:ReferenceInput and DependentInput参考输入和从属输入
【发布时间】: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


    【解决方案1】:

    我认为这与自述文件中的情况相同:https://github.com/marmelab/aor-dependent-input#re-rendering-the-dependentinput-children-when-the-values-of-the-dependencies-change

    你能试着告诉我们进展如何吗?

    【讨论】:

    • 很高兴,玩得开心!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-04
    • 1970-01-01
    • 2021-06-19
    • 1970-01-01
    • 1970-01-01
    • 2016-05-28
    相关资源
    最近更新 更多