react-admin
react-admin copied to clipboard
Using filter on ReferenceArrayInput prevents data from being rendered
What you were expecting: My data shown in the ReferenceArrayInput
What happened instead: Nothing is rendered in the ReferenceArrayInput
Steps to reproduce: Use a filter on a ReferenceArrayInput
Related code:
onChangeFilter = (props) => {
const {
change,
customer,
id
} = this.props;
change('record-form', 'timeSheetIds', null);
return { isLinkedToInvoice: false, ignoreInvoiceId: id };
}
<ReferenceArrayInput
label="Timesheets"
resource={resource}
source="timeSheetIds"
reference="timesheets"
filter={this.onChangeFilter(this.props)}
allowEmpty>
<SelectArrayInput optionText="description" />
</ReferenceArrayInput>
Other information: If i remove the filter, the data is rendered The api is queryied succesfully using the filter
Environment
- React-admin version: 2.8.4
- React version: 16.6.3
- Browser: chrome
never mind, found the issue...