diff --git a/packages/ra-ui-materialui/src/input/SelectArrayInput.js b/packages/ra-ui-materialui/src/input/SelectArrayInput.js index 482b68d68bb..36937541906 100644 --- a/packages/ra-ui-materialui/src/input/SelectArrayInput.js +++ b/packages/ra-ui-materialui/src/input/SelectArrayInput.js @@ -187,6 +187,7 @@ export class SelectArrayInput extends Component { source, optionText, optionValue, + helperText, ...rest } = this.props; if (typeof meta === 'undefined') { @@ -194,7 +195,7 @@ export class SelectArrayInput extends Component { "The SelectInput component wasn't called within a redux-form . Did you decorate it and forget to add the addField prop to your component? See https://marmelab.com/react-admin/Inputs.html#writing-your-own-input-component for details." ); } - const { touched, error, helperText = false } = meta; + const { touched, error } = meta; return ( ', () => { const { queryByTestId } = render( ); - expect(queryByTestId('selectArray')).not.toBeNull(); + expect(queryByTestId('selectArray')).toBeDefined(); }); it('should use the input parameter value as the initial input value', () => { @@ -153,12 +153,9 @@ describe('', () => { it('should displayed helperText if prop is present in meta', () => { const { queryByText } = render( - + ); - expect(queryByText('Can I help you?')).not.toBeNull(); + expect(queryByText('Can I help you?')).toBeDefined(); }); describe('error message', () => { @@ -186,10 +183,10 @@ describe('', () => { const { queryByText } = render( );