🐛 fixes #16871 Cascader - Space during search

This commit is contained in:
Juraj Carnogursky 2019-06-01 23:40:49 +02:00
parent 86bc28161c
commit 24ee1634f0

View File

@ -292,7 +292,8 @@ class Cascader extends React.Component<CascaderProps, CascaderState> {
};
handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
if (e.keyCode === KeyCode.BACKSPACE) {
// SPACE => https://github.com/ant-design/ant-design/issues/16871
if (e.keyCode === KeyCode.BACKSPACE || e.keyCode === KeyCode.SPACE) {
e.stopPropagation();
}
};