Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

ReferenceInput #25

Closed
selini opened this issue Feb 1, 2018 · 2 comments
Closed

ReferenceInput #25

selini opened this issue Feb 1, 2018 · 2 comments

Comments

@selini
Copy link

selini commented Feb 1, 2018

I have 2 ReferenceInput. The thing I want is to pick a company and show only branches of that company. I try this but it does not work.
The branches have a field called motherID that connects them with the companies.

    <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>
@djhi
Copy link
Contributor

djhi commented Feb 1, 2018

Have you read https://github.com/marmelab/aor-dependent-input#re-rendering-the-dependentinput-children-when-the-values-of-the-dependencies-change ?

Also, please try to put up a repository or, even better, a codesandbox, which reproduce your issue.

Finally, please use StackOverflow when you need help with your code. Github should be kept for issues and feature requests.

@selini
Copy link
Author

selini commented Feb 1, 2018

No, I will check it out.
I posted a question in StackOverflow. Thanks for the answer. I will close the issue.

@selini selini closed this as completed Feb 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants