Fix keepOnClick

master
Vitaliy Filippov 2020-04-27 19:00:05 +03:00
parent 559365b852
commit 1c7709bdd4
1 changed files with 6 additions and 2 deletions

View File

@ -54,9 +54,13 @@ export default class PickerMenu extends Picker
onMouseDown = (ev) =>
{
if (ev)
if (!this.props.keepOnClick)
{
this.props.keepOnClick ? ev.preventDefault() : this.blur();
this.blur();
}
else if (ev)
{
ev.preventDefault();
}
const sel = this.props.items[this.state.active];
const f = this.props.onSelectItem;