diff --git a/packages/material-ui/src/Select/Select.test.js b/packages/material-ui/src/Select/Select.test.js
index f654cfc36ff384..c357f8478839f8 100644
--- a/packages/material-ui/src/Select/Select.test.js
+++ b/packages/material-ui/src/Select/Select.test.js
@@ -971,4 +971,20 @@ describe('', () => {
expect(keyUpSpy.callCount).to.equal(1);
expect(keyUpSpy.returnValues[0]).to.equal(true);
});
+
+ it('should pass onClick prop to MenuItem', () => {
+ const onClick = spy();
+ const { getAllByRole } = render(
+ ,
+ );
+
+ const options = getAllByRole('option');
+ fireEvent.click(options[0]);
+
+ expect(onClick.callCount).to.equal(1);
+ });
});
diff --git a/packages/material-ui/src/Select/SelectInput.js b/packages/material-ui/src/Select/SelectInput.js
index c6c6e3d1a4d5b0..4d17eb618cdeb5 100644
--- a/packages/material-ui/src/Select/SelectInput.js
+++ b/packages/material-ui/src/Select/SelectInput.js
@@ -140,6 +140,10 @@ const SelectInput = React.forwardRef(function SelectInput(props, ref) {
newValue = child.props.value;
}
+ if (child.props.onClick) {
+ child.props.onClick(event);
+ }
+
if (value === newValue) {
return;
}
@@ -252,9 +256,9 @@ const SelectInput = React.forwardRef(function SelectInput(props, ref) {
// the select to close immediately since we open on space keydown
event.preventDefault();
}
- const { onKeyUp } = child.props;
- if (typeof onKeyUp === 'function') {
- onKeyUp(event);
+
+ if (child.props.onKeyUp) {
+ child.props.onKeyUp(event);
}
},
role: 'option',