Open sagar-prolix opened 5 years ago
I'm having the same issue with search input text fields where spaces do not register, so I'm unable to type multiple words. The e.target.value
is not including the spaces typed, which leads me to believe that text inputs are being manipulated somewhere globally in the package, but I can't pinpoint where.
This issue can be observed on the Storybook Demo on default view.
package version: 0.3.2
I've got the same issue with 0.3.3 running Chrome 75.0.3770.100 on MacOS 10.14.3.
It seems the problem is that there is an onKeyDown listener on the component to allow expanding the dropdown using e.g. space, but this handler also runs while typing in the search field which prevents the onChange event in the input field. Removing the onKeyDown listeners fixes the problem, but I'm guessing the maintainers would prefer a more elegant solution.
I have same issues, the search input text not let me adding space if the 'search word' is having 2 word or more
@ElNath11 Try to use filterOptions
prop. It looks kike this:
(options: Array<Option>, filter: string) => Array<Option>
node_modules/@khanacademy/react-multi-select/dist/dropdown.js:64
case 13: // Enter Key
// patch: this will not allow to input space
// case 32: // Space
case 40:
// Down Arrow
_this.toggleExpanded(true);
break;
follow guide of patch-package
Followed the patch guide only expand if not already expanded
if (expanded) {
_this.toggleExpanded(true);
} else {
return;
}
How can i override search functionality.